check if handler exist before using it
Thierry
00bioarchimed at free.fr
Fri Nov 9 14:00:53 EST 2007
Hi Jim and Richard,
Well, is it Christmas soon ?
so many interesting answers :)
Ok, but, how does one make the difference between
an unknown "dothisFunction" and any kind of error
in the existing "dothisFunction" ?
Again, those functions can be written by anyone, protected or not...
that's why I talk of a generic solution, but maybe it's not
the good term - you know, these french guys, when they try
to speak English :-)
And last but not least, the checking comes from inside an external....
So, i've done a quick test, with :
try
get xxx()
catch errStr
answer errStr
end try
and I get:
219,3,21,xxx
119,3,9
465,3,1
????
and didn't find in the Doc how to deal with these Errors numbers ?
Regards,
Thierry
> You could use
>
> on try
> doThisFunction()
> catch errString
> --function not available, take action
> end try
>
> Jim Ault
>> As there is the rev function:
>> exists( an object ) or there is .... ,
>>
>> is there something like
>> exists( <whateverFunction> ) in <anyObject>
More information about the use-livecode
mailing list