Custom Properties

Peter M. Brigham pmbrig at gmail.com
Fri Jun 28 09:36:04 EDT 2013


On Jun 27, 2013, at 11:11 AM, Graham Pearson wrote:

> Well for somehow the custom property was being stored in one of the
> SubStacks of the main stack and not within the main stack. Now to figure
> out what I did to make this happen.

Perhaps at the time you set the customprop the topstack was likely not what you thought. When setting customprops it is best to be explicit:

   set the myCustomProp of stack "prefsStack" to "something"

and not

   set the myCustomProp of this stack to "something"

which will be dependent on the (changeable) value of "this stack."

Be aware that if you are building a standalone then you will actually want to store the customprops in a substack and not the mainstack. In a standalone, the main stack is the executable and changes will not be saved from session to session. Even if you're not storing volatile data, it's best to keep the mainstack as a splashstack and keep everything on the operations and data side away from the spashstack. Including scripts used by your substacks. Put those into a library stack that you start using on startup. If you do it that way then updates will be easier in the future.

-- Peter

Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig





More information about the use-livecode mailing list