the effective revAvailableHandlers

Organizing tasks to work on, New Features Ideas, Building LCS & LCB Libraries & Widgets, Redecorating and Modifying the IDE, Hacking / Editing Tools, Compiling the Engine from Source, etc.
Post Reply
User avatar
OpenXTalkPaul
Posts: 2572
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

the effective revAvailableHandlers

Post by OpenXTalkPaul »

There is an IDE property revAvailableHandlers, has a value of a list of handlers (and variables) that are available from the script of a given 'scriptObject' (control, card, stack, or group). There's also an EFFECTIVE for of the property that lists ALL of the handlers available including functions, commands from libraries, externals, extensions, etc.

Heres's a snippet for message box:

Code: Select all

get  the effective revAvailableHandlers of stack "home";sort it;put it
or try topStack:

Code: Select all

get the effective revAvailableHandlers of the topStack;sort it;put it
The result is a list that's in the IDE's format that is used by the Script Editor

I believe the format of this list is:
Letters _ handlerName _ startingScriptLineOfhandler, endinigScriptLineOfhandler stack "path/to/stack"
_ equals 1 space " "

'Letters' is on of the following list along with there equivalent meaning:
F = function
PF = private function
M = message
PM = private message
A = after-message -- for emp. a handler 'after mouseUp' gets executed after the normal 'on mouseUp' message.
B = before-message -- exmp. handler 'before mouseDown' gets executed before the normal 'on mouseDown' handler message.
G = getProp
S = setProp

Next in each line there is a single space and then the Handlers name.
This script sorts the list by handlerNames:

Code: Select all

get the effective revAvailableHandlers of the topStack;sort it by word 2 of each; put it
This is followed by a single space and then two numbers separated by a comma.
These numbers are the line-number of the first script line where the handler begins, and the line of number where that handler ends, which can be used to make a chunk expression in order to select or copy the handler for example.

That can optionally be followed by a space and the name of a stack where the handler originates, this is because it may be important to know if the handler exists in another stack, as the handler could exist in a behavior script or library stack.

Edited, Aug. 4, 2024 -- merged info from second post, and fixed up some bad text.
User avatar
OpenXTalkPaul
Posts: 2572
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: the effective revAvailableHandlers

Post by OpenXTalkPaul »

F = function
PF = private function
M = message
PM = private message
G = getProp
S = setProp
Also:
A = after-message
B = before-message

better to sort that list like this:

Code: Select all

get the effective revAvailableHandlers of the topStack;sort it by word 1 of each; put it
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests