customPropertySets

Peter Haworth pete at lcsql.com
Fri May 10 14:01:56 EDT 2013


Ha, you're right, didn't think to look in the dictionary.  It's working as
documented. Still seems a little strange to me but I can work round it.

Pete
lcSQL Software <http://www.lcsql.com>


On Fri, May 10, 2013 at 10:54 AM, <dunbarx at aol.com> wrote:

> Peter.
>
>
> Not sure, but the dictionary says:
>
>
>
>
> If using arbitrary custom property names, be aware that it won't be
> possible to access them by changing the customPropertySet if they clash
> with LiveCode language keywords. Instead, either use the array style
> notation above, or use a prefix to prevent name clashes (for example
> "uName" instead of "name").
>
>
> Is this a possible collision?
>
>
> Craig Newman
>
>
>
>
> -----Original Message-----
> From: Peter Haworth <pete at lcsql.com>
> To: How to use LiveCode <use-livecode at lists.runrev.com>
> Sent: Fri, May 10, 2013 1:06 pm
> Subject: customPropertySets
>
>
> I'm seeing an unexpected behavior when using the customProperty set of an
> object.
>
> Here's the recipe.
>
> 1.Create a new stack and put a datagrid on it
> 2. Make a button with the following code:
>
>    on mouseUp
>       set the customPropertyset of group "Datagrid 1" to "dgProps"
>       get the style of group "Datagrid 1"
>    end mouseUp
>
> 3. Click the button.
>
> You will get an error on the "get the style" line, "object does not have
> this property".
>
> Changing the "get" line to access any other custom property of dgProps
> works fine.
>
> If I change the "get the style" line to "get the dgProps["style"] of group
> "Datagrid 1", all works as expected.
>
> The dgProps set does have a "style" property but "style" is a built-in
> property name too so it appears that LC does not observe the
> customPropertyset setting if the property being accessed has the same name
> as a built-in property.
>
> Bug?
>
>
> Pete
> lcSQL Software <http://www.lcsql.com>
> _______________________________________________
> 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
>
>
> _______________________________________________
> 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