matchText question

Peter M. Brigham pmbrig at gmail.com
Sat Feb 28 10:01:01 EST 2015


On Feb 27, 2015, at 10:20 PM, Richard Gaskin wrote:

> Peter M. Brigham wrote:
> 
> > The output I get from revAvailableHandlers looks like this:
> >
> > M mouseleave 14 17 button id 1026 of group id 1021 of card id 1082
> > of stack "NCMHC notes" of stack "/Users/pmbrig/Documents/LiveCode/
> > NCMHC notes/  NCMHC notes.rev"
> > M mousemove 1 12
> > M mouseup 19 131
> > F countVisits 133 165
> >
> > It looks as if the first line is the first handler && the long id of
> > the target, followed by the other handlers, M for command and F for
> > function, with the starting and ending line numbers. Very useful, but
> > an odd format. This is on LC 5.5.1. Can others confirm that the
> > output is similar with later versions of LC? I want to be sure that I
> > can delete word 4 to -1 of line 1 and reliably get just a list of
> > handlers.
> 
> The cool thing about this format is that it distinguishes handler type.  In a simple list of handler names you may not know that one of them is a getProp, the other a function, and which ones are private.  With this format you get that and more.
> 
> The line numbers let you extract handlers instantly if needed, for example to quickly compare chunks from one version of a script and another.
> 
> Uncommon indeed, but also uncommonly useful.

Yes, it's a terrifically useful format overall. My question was about that curious first line, however -- whether I can safely delete word 5 to -1 of line 1 (I mistakenly said 'word 4 to -1' in my original post) and get a pure list of handlers with their types and lineoffsets. I don't know why the LC team didn't put the long id of the object in line 1 and start the handler list at line 2, and I wanted to make sure that this oddity persists in later versions of the engine.

-- Peter

Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig






More information about the use-livecode mailing list