Navigation menu

WoW:User defined functions: Difference between revisions

Jump to navigation Jump to search
m (catfix)
(Typo fixing using AWB)
Line 11: Line 11:
: [[setArgs]](myTable, "name", ...) - remember list of arguments to use for a callback
: [[setArgs]](myTable, "name", ...) - remember list of arguments to use for a callback
: [[getArgs]](myTable, "name", ...) - retreive stored list of arguments, plus optional extras
: [[getArgs]](myTable, "name", ...) - retreive stored list of arguments, plus optional extras
: [[GetReturnValues|GetReturnValues]](order, functionCall) - Get the return values from ''functionCall'' in any ''order'' you want.
: [[GetReturnValues]](order, functionCall) - Get the return values from ''functionCall'' in any ''order'' you want.


== Color Functions ==
== Color Functions ==
Line 24: Line 24:


== Event Functions ==
== Event Functions ==
:[[User:Egingell/PLAYER_MONEY|PLAYER_MONEY]] - Add a message to the chat frame when you gain or spend money.
:[[User:Egingell/PLAYER MONEY|PLAYER_MONEY]] - Add a message to the chat frame when you gain or spend money.


== Frame Functions ==
== Frame Functions ==
Line 51: Line 51:
== Slash Function ==  
== Slash Function ==  
: [[RunSlashCmd]] - Passes a slash command to the chatframe
: [[RunSlashCmd]] - Passes a slash command to the chatframe
: [[SlashCmdList_AddSlashCommand|SlashCmdList_AddSlashCommand]](name, func, ...)
: [[SlashCmdList AddSlashCommand|SlashCmdList_AddSlashCommand]](name, func, ...)


== String Functions ==
== String Functions ==
Line 61: Line 61:
:[[strfindt]](tabCaptures, ...)   - Wrapper for [[API strfind|strfind]]() that returns captures in a table - can be used in if() clauses!
:[[strfindt]](tabCaptures, ...)   - Wrapper for [[API strfind|strfind]]() that returns captures in a table - can be used in if() clauses!
:[[StringHash]]("string")   - Create a fair-quality 32-bit hash of a string
:[[StringHash]]("string")   - Create a fair-quality 32-bit hash of a string
:[[substr]]("string", start [, length])   - Imp [[API_strsub|strsub]]. Returns a string starting from ''start'' to ''length'' characters from ''start'' (identical to the [http://php.net/substr PHP function] of the same name).
:[[substr]]("string", start [, length])   - Imp [[API strsub|strsub]]. Returns a string starting from ''start'' to ''length'' characters from ''start'' (identical to the [http://php.net/substr PHP function] of the same name).


== Table Functions ==
== Table Functions ==
Line 78: Line 78:


[[Category:Interface customization]]
[[Category:Interface customization]]
[[Category:User defined functions| {{PAGENAME}}]]
[[Category:User defined functions| User defined functions]]
Anonymous user