Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(3 Kb)
Download
Updated: 10-13-14 11:29 PM
Pictures
File Info
Compatibility:
Warlords of Draenor Pre-Patch (6.0.2)
Siege of Orgrimmar (5.4)
Escalation (5.3)
Thunder Isle (5.2)
Landfall (5.1)
Mists of Pandaria (5.0.4)
Updated:10-13-14 11:29 PM
Created:07-07-14 01:59 PM
Downloads:83
Favorites:2
MD5:
6.0.2
Output
Version: 1.0.1
by: Vrul [More]
Provides an API and slash commands for outputting variable information to chat. The information is presented in the following format: index type value name

index - an integer starting with one and incrementing for each new line

type - the return of type(variable), or the return of variable:GetObjectType() if applicable

value - the return of tostring(variable) (functions, tables, threads, and userdata the return is truncated so that "table: 0000B6D0" is instead "B6D0")

name - the global name for the variable if one exists (for functions, tables, threads, and userdata only). If the variable is a table and has a GetName method then the name will be colored yellow if _G[variable:GetName()] == variable or red otherwise

The formatted output is also preceded and trailed by blank lines as needed to help make reading multiple different output calls easier.


API

output(...)

Output variable information as described above.

Arguments:
... - (any) Variables to have their information output.

output.chatFrame = variable

Change which chat frame output is directed to.

Arguments:
variable - (number or nil) The index of the desired chat frame, a value of 0 or nil will use DEFAULT_CHAT_FRAME.
(string) The name of the desired chat frame
(table) The chat frame object to use

output.header(...)

Similar to print(...) but will add a blank line before outputting if needed and will not result in a blank line between it and any output calls that immediately follow.

Arguments:
... - (any) The information to be output.

output.ipairs(variable)

Output information for the array portion of a table.

Arguments:
variable - (table) Table to have its array contents output.

output.metatable(variable)

Syntactic sugar for output(getmetatable(variable)) or output.pairs(getmetatable(variable)) or output.pairs(getmetatable(variable).__index) as appropriate.

Arguments:
variable - (any) The variable whose metatable information should be output.

output.pairs(variable)

Output information for each key - value pair contained in a table.

Arguments:
variable - (table) Table to have its contents output.

output.parse(variable)

Syntactic sugar for output(SecureCmdOptionParse(variable)).

Arguments:
variable - (string) The parameters to be parsed.

output.print(...)

Similar to print(...) but will output to output.chatFrame instead. This function will not automatically add preceding and trailing blank lines like the other functions do.

Arguments:
... - (any) The information to be output.

Slash Commands

/print ... - Same as /run output.print(...)

/out ... - Same as /run output(...)

/output ... - Same as /run output(...)

/ipairs ... - Same as /run output.ipairs(...)

/pairs ... - Same as /run output.pairs(...)

/parse ... - Same as /run output.parse(...)

/metatable ... - Same as /run output.metatable(...)
Version 1.0.1 (10/14/2014)
- TOC bump for 6.0

Version 1.0 (07/07/2014)
- Initial release
Optional Files (0)


Archived Files (1)
File Name
Version
Size
Author
Date
1.0
3kB
Vrul
07-07-14 02:01 PM


Post A Reply Comment Options
Unread 07-07-14, 04:32 PM  
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 5033
File comments: 291
Uploads: 25
Sounds useful but what will the output look like ?
Perhaps some screenshots of examples.
__________________
Xrystal is online now Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: