Virtual properties
DunbarX at aol.com
DunbarX at aol.com
Wed Mar 24 18:20:46 EDT 2010
It might be important to repeat (or at least for me it is) that if one
wants to use a virtual property that never gets attached to a particular object,
you simply do not ever pass the propertyName in the setprop handler. If you
do, a custom property with that name will be created, just like a variable
would be.
Reading Peter Brigham's mail, he never encounters that issue since he never
expllicitly names an object to which he is setting the virtual property,
only referrng to "the target". That is nice.
Is it true then, that "set" commands and commands that retrieve custom
properties are always intercepted by "setprop" and "getProp"? And these will not
pass to the engine unless you let them? Is this the single, or at least the
most important instance where it is possible to intercept commands? Rev,
unlike HC, does not normally allow this to happen to reserved words. Here, you
can, and it seems appropriate.
Craig Newman
More information about the use-livecode
mailing list