check if handler exist before using it
Thierry
00bioarchimed at free.fr
Fri Nov 9 10:53:31 EST 2007
Thanks Mark,
A good script :-)
.... but see my last answer.
Anyway, that Helps !
Regards,
Thierry
> getProp handlerNames
> put the script of the target into myScript
> repeat for each line myLine in myScript
> if word 1 of myLine is "on" then
> put word 2 of myLine && "command" & return after myList
> else if word 1 of myLine is "function" then
> put word 2 of myLine && "function" & return after myList
> else if word 1 of myLine is among the items of
> "getProp,setProp" then
> put word 2 of myLine && "property" & return after myList
> end if
> end repeat
> delete last char of myList
> sort lines of myList
> return myList
> end handlerNames
>
> Usage:
> put the handlernames of group id 1004
> if "foo command" is among the lines of the handlernames of this
> stack then...
>
>
>> Thanks Xavier,
>>
>> Do you mean you're parsing the text of the script ?
>>
>> But then how do you do, if you have a protected stack,
>> where the text script is not available anymore ?
>>
>> ps: i'm looking for a generic method.
More information about the use-livecode
mailing list