Proper error handling in a setprop
dunbarx at aol.com
dunbarx at aol.com
Fri Oct 10 21:53:05 EDT 2014
I am missing what you are asking. A setProp control structure is similar to a command control structure. It triggers when the explicitly associated custom property is changed.
Once started, it acts like any other handler, executing statements and perhaps placing a new value into the property. Errors would appear normally, like in any handler, where the engine stops execution and you deal as you please with the situation.
They could not be placed in a "try" structure. They are themselves control structures. No control structure can be placed inside another:
on doThis
on doThat
end doThat
end doThis
No, no. None of that.
Or do I have this totally wrong?
Craig Newman
-----Original Message-----
From: Michael Doub <mikedoub at gmail.com>
To: How To use LiveCode use LiveCode <use-livecode at lists.runrev.com>
Sent: Fri, Oct 10, 2014 6:37 pm
Subject: Proper error handling in a setprop
Can anyone advise me on the options that we have for dealing with errors that
are encountered while executing in a setprop? I was thinking of using set
prop to turn on and off the GPIOs on a raspberry pi. I have commands doing it
now and it is working fine.
Do you throw an error and assume the user is calling the set prop inside of a
try statement? Are there other ways?
Thanks in advance
Mike
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list