Confirm: An array is not allowed in a custom property

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
gmccarthy
Posts: 62
Joined: Sat Feb 17, 2007 4:56 am

Confirm: An array is not allowed in a custom property

Post by gmccarthy » Wed Sep 23, 2009 4:33 am

Is it possible to store an arrays in a custom property of a button?

I found the user guide to be a little confusing on this:
7.8 Custom Properties
A custom property is a property that you create for an object, in addition to its built-in properties. You can define custom properties for any object, and use them to store any kind of data.

7.9.8
Storing an array in a custom property set
It is not possible to store an array in a single custom property, because each custom property set is already an array of the custom properties in the set.


I have been able to store an array in a custom property of a button and reuse the data from the array while the stack is in memory.
The property inspector gives a note that there is an array stored but that it cannot be edited there.
However, the button that had the custom property could not be copied to another empty stack.
On saving and reopening the stack has been corrupted (message on trying to open it again later on).

Has anyone had a similar experience?
I assume section 7.9.8 is there to clarify 7.8. :(

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Contact:

Post by trevordevore » Wed Sep 23, 2009 6:15 am

As of Revolution 3.0 arrays can be stored in custom properties. The manual may be out of date.

I did hear of someone else having a corrupted stack after saving an array to a custom property. Can you file a bug report and attach your stack to it at http://quality.runrev.com? That would help the dev team track down the cause.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

gmccarthy
Posts: 62
Joined: Sat Feb 17, 2007 4:56 am

RE Confirm: An array is not allowed in a custom property

Post by gmccarthy » Wed Sep 23, 2009 8:59 am

Thanks Trevor,
I thought this was so.
I posted stack and instructions to get it corrupted.
http://quality.runrev.com/qacenter/show_bug.cgi?id=8292
Gerard

Post Reply