Minty23185Fresh
April 2nd, 2018, 19:05
THIS EXTENSION IS NO LONGER AVAILABLE.
While developing new extensions I constantly find myself having to dump data to the Debug console for analysis. It seems to be the only tool we have. I've also noticed that I usually need to dump the same data from project to project. I've started collecting my "data dumpers" in an external extension. I've thought of publishing it for a while, so now I've prettied it up a bit, and here it is.
I'm releasing it to public domain, for everyone's consumption and modification. My hope being that, if you have a couple routines sitting on the wayside you'll deem the DevTools toolbox worthy of including them, make the modifications and republish.
The current tools are:
1) dumpControlProperties: outputs a window control's properties (e.g. genericcontrol.getSize())
2) dumpDragData: outputs the contents of a dragdata or draginfo object
3) dumpNodeNames: (recursive) outputs the node names of a database subtree
4) dumpSupers: (recursive) outputs a super (or self) object's contents and any sub-super's contents
5) dumpWindowControls: outputs the names of all controls in a window object
6) dumpWindowlist: technically a window control, but handled separately, outputs the windows in a windowlist
7) runThis: put some code in here and divert execution to it (I use it for developing pattern matching strings)
Each of the routines have two or more arguments. The common arguments are:
1) the object being operated on, e.g. super, a window, a window control
2) an announcement: a string output at the beginning of the routine (I typically put the caller routine's name in here)
Information about other arguments is available in a "usage" preamble just above each method.
e.g. --[[ usage: DevTools.dumpWindowlist(windowlist, [sAnnounce], [bDumpSubWindows]);
Just copy and paste the part after "usage:" to your caller, and fill in the appropriate parameters.
(Hint: If your code editor supports code collapse as Notepad++ does, collapse the manager_tools.lua file to level one to see each function's preamble)
Which brings up the issue of using the extension (I believe it to be ruleset nonspecific.)
Personally I unzip the extension into a _DevTools folder. That way the folder is toward the top of my extension subfolder. I unzip the extension because I may want to look at the usage preambles, or make quick changes to tools, fix tools or use the runThis( ) tool.
I'll reserve the next post of this thread for some additional details.
(E.g. there is a chat slash handler and some of the individual tools might need some elucidation.)
Here is an example of part of the output from dumpControlProperties():
Runtime Notice: s'==DevTools==dumpControlProperties() | ' | s'Hello there, from MY Calling Method'
Runtime Notice: s'==DevTools==dumpControlProperties() | control=, type=' | windowcontrol = { x,y,w,h = 0,0,0,0 } | s'genericcontrol'
Runtime Notice: s'==DevTools==dumpProperty() | control property: icon = ' | s'dot_blue'
Runtime Notice: s'==DevTools==dumpProperty() | control property: hasIcon( ) = ' | bTRUE
Runtime Notice: s'==DevTools==dumpControlProperties() | ' | s'Inherited <windowcontrol> properties'
Runtime Notice: s'==DevTools==dumpControlProperties() | control=, type=' | windowcontrol = { x,y,w,h = 0,0,0,0 } | s'windowcontrol'
Runtime Notice: s'==DevTools==dumpProperty() | control property: anchored.height = ' | s'50'
Runtime Notice: s'==DevTools==dumpProperty() | control property: anchored.top.anchor = ' | s'bottom'
Runtime Notice: s'==DevTools==dumpProperty() | control property: anchored.top.offset = ' | s'17'
Runtime Notice: s'==DevTools==dumpProperty() | control property: anchored.top.parent = ' | s'columnanchor'
Runtime Notice: s'==DevTools==dumpProperty() | control property: anchored.top.relation = ' | s'relative'
I'll keep a subscription to this thread and polish things up as need be. Thanks for comments, criticisms, and hopefully additional content!
While developing new extensions I constantly find myself having to dump data to the Debug console for analysis. It seems to be the only tool we have. I've also noticed that I usually need to dump the same data from project to project. I've started collecting my "data dumpers" in an external extension. I've thought of publishing it for a while, so now I've prettied it up a bit, and here it is.
I'm releasing it to public domain, for everyone's consumption and modification. My hope being that, if you have a couple routines sitting on the wayside you'll deem the DevTools toolbox worthy of including them, make the modifications and republish.
The current tools are:
1) dumpControlProperties: outputs a window control's properties (e.g. genericcontrol.getSize())
2) dumpDragData: outputs the contents of a dragdata or draginfo object
3) dumpNodeNames: (recursive) outputs the node names of a database subtree
4) dumpSupers: (recursive) outputs a super (or self) object's contents and any sub-super's contents
5) dumpWindowControls: outputs the names of all controls in a window object
6) dumpWindowlist: technically a window control, but handled separately, outputs the windows in a windowlist
7) runThis: put some code in here and divert execution to it (I use it for developing pattern matching strings)
Each of the routines have two or more arguments. The common arguments are:
1) the object being operated on, e.g. super, a window, a window control
2) an announcement: a string output at the beginning of the routine (I typically put the caller routine's name in here)
Information about other arguments is available in a "usage" preamble just above each method.
e.g. --[[ usage: DevTools.dumpWindowlist(windowlist, [sAnnounce], [bDumpSubWindows]);
Just copy and paste the part after "usage:" to your caller, and fill in the appropriate parameters.
(Hint: If your code editor supports code collapse as Notepad++ does, collapse the manager_tools.lua file to level one to see each function's preamble)
Which brings up the issue of using the extension (I believe it to be ruleset nonspecific.)
Personally I unzip the extension into a _DevTools folder. That way the folder is toward the top of my extension subfolder. I unzip the extension because I may want to look at the usage preambles, or make quick changes to tools, fix tools or use the runThis( ) tool.
I'll reserve the next post of this thread for some additional details.
(E.g. there is a chat slash handler and some of the individual tools might need some elucidation.)
Here is an example of part of the output from dumpControlProperties():
Runtime Notice: s'==DevTools==dumpControlProperties() | ' | s'Hello there, from MY Calling Method'
Runtime Notice: s'==DevTools==dumpControlProperties() | control=, type=' | windowcontrol = { x,y,w,h = 0,0,0,0 } | s'genericcontrol'
Runtime Notice: s'==DevTools==dumpProperty() | control property: icon = ' | s'dot_blue'
Runtime Notice: s'==DevTools==dumpProperty() | control property: hasIcon( ) = ' | bTRUE
Runtime Notice: s'==DevTools==dumpControlProperties() | ' | s'Inherited <windowcontrol> properties'
Runtime Notice: s'==DevTools==dumpControlProperties() | control=, type=' | windowcontrol = { x,y,w,h = 0,0,0,0 } | s'windowcontrol'
Runtime Notice: s'==DevTools==dumpProperty() | control property: anchored.height = ' | s'50'
Runtime Notice: s'==DevTools==dumpProperty() | control property: anchored.top.anchor = ' | s'bottom'
Runtime Notice: s'==DevTools==dumpProperty() | control property: anchored.top.offset = ' | s'17'
Runtime Notice: s'==DevTools==dumpProperty() | control property: anchored.top.parent = ' | s'columnanchor'
Runtime Notice: s'==DevTools==dumpProperty() | control property: anchored.top.relation = ' | s'relative'
I'll keep a subscription to this thread and polish things up as need be. Thanks for comments, criticisms, and hopefully additional content!