setprop handlers for custom property sets
mwieder at ahsoftware.net
Thu Jul 30 23:31:55 CEST 2015
Paul Dupuis <paul at ...> writes:
> On 7/30/2015 4:34 PM, Mark Wieder wrote:
> > Paul Dupuis <paul <at> ...> writes:
> >> The LC 6.7.5 dictionary entry for setProp has the following:
> >> If the custom property you want to control is in a custom property set,
> >> use array notation in the first line of the setProp handler, as in the
> >> following example:
> > Interesting. I do see that in the documentation, but I've never used that.
> > The way I've always dealt with custom property sets is to switch context:
> > set the customPropertySet of <object> to <name>
> > set the <property> of <object> to <whatever>
> > get the <property> of <object>
> > set the customPropertySet of <object> to empty
> > I think this makes for a cleaner, easier-to-read format anyway.
> I agree, but that still doesn't answer if you can use setProp and
> getProp handlers with individual custom properties in custom property sets.
Well, it eliminates the need for the array syntax,
which is what I thought you were asking about.
Within the customPropertySet you just have:
setProp property1 pValue
set the property1 of me to pValue
setProp property2 pValue
set the property2 of me to pValue
ahsoftware at gmail.com
More information about the use-livecode