customPropertySets

Peter Haworth pete at lcsql.com
Fri May 10 13:04:55 EDT 2013


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>



More information about the use-livecode mailing list