WoW:API Frame GetAttribute: Difference between revisions
Jump to navigation
Jump to search
(Created page with '{{widgetmethod}} Returns the value of a specific attribute (or an attribute matching the prefix/suffix arguments). value = frame:GetAttribute(name); value = frame:GetAttribute(...') |
m (Move page script moved page API Frame GetAttribute to API Frame GetAttribute without leaving a redirect) |
||
(One intermediate revision by one other user not shown) | |||
Line 6: | Line 6: | ||
==Arguments== | ==Arguments== | ||
; prefix : String - modifier prefix string: a concatenation of alt-, ctrl-, and shift-, whichever apply, in that order. | ; prefix : String - modifier prefix string: a concatenation of alt-, ctrl-, and shift-, whichever apply, in that order. | ||
; name : Attribute name. If | ; name : Attribute name. If passed as the only argument, this may be a fully qualified value; otherwise, it is the unmodified name of the attribute being retrieved. | ||
; suffix : String - button suffix string: either a numeric string or a dash followed by an arbitrary button name. | ; suffix : String - button suffix string: either a numeric string or a dash followed by an arbitrary button name. | ||
Latest revision as of 04:45, 15 August 2023
← Widget API ← Frame < GetAttribute
Returns the value of a specific attribute (or an attribute matching the prefix/suffix arguments).
value = frame:GetAttribute(name); value = frame:GetAttribute(prefix, name, suffix);
Arguments[edit]
- prefix
- String - modifier prefix string: a concatenation of alt-, ctrl-, and shift-, whichever apply, in that order.
- name
- Attribute name. If passed as the only argument, this may be a fully qualified value; otherwise, it is the unmodified name of the attribute being retrieved.
- suffix
- String - button suffix string: either a numeric string or a dash followed by an arbitrary button name.
Returns[edit]
- value
- Mixed - the value of the matching attribute; nil if no attribute matched the arguments.
Matching order[edit]
When invoked with three arguments, this function attempts to return attributes in the following order (returning the first attribute that exists):
- prefix .. name .. suffix
- "*" .. name .. suffix
- prefix .. name .. "*"
- "*" .. name .. "*"
- name