Am 22.09.2005 um 16:46 schrieb Valentin Schmidt:

Hi Alex,

great stuff, just one little flaw:
if there are 2 handlers in a script, "on foo" and "on fooBar", and the second comes first, searching for handler "foo" would find "fooBar". A simple fix might be to search (offset(...)) for either "on foo"&SPACE or "on foo"&RETURN

absolutely right, I stand corrected.
there are still other flaws which I thought of:

- some of my scripts catch the handlers() function to hide from curious views... ;-)

- it should check only for scripts of type #movie, as behaviors and parent scripts may have the same handler names or in case of parent and behavior it should store the last result in a global variable and proceed from that position in the castlib downwards at the next call to the function, à la "find next"


I've used UIHelper for some of my own tool miaws like for example "findAll", which could be also used to find all occurrences of:

"\ron\s*foo\W"

to find

on foo
as well as
on foo(

personally I don't like the parentheses at all, I only use parentheses for functions which return something. so I can distinguish easier between:

value = foo()

and

foo


but that's stupid aesthetik... ;-)

---------------------------

  |||
a¿ex


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to