[OT] dialect divergence?

Bob Sneidar bobs at twft.com
Mon Jun 13 17:54:59 EDT 2011

I like to think of properties as read only variables, which can only be altered by "setting" them to some other variable or constant. Properties have two things that make them attractive: The first is that they are "global" in the sense that you can get any custom property of any object from any script, at any time, and the second is that they are persistent, meaning you can set a property, and quit Livecode, and next time you launch you stack again the property will still contain the data you set it to. 

Some will cite also the fact that they can store anything, text, numbers, arrays, pictures, sound clips, and even another whole stack!! The one thing to be aware of, is that in standalones, like all information in the mainstack, fields and properties cannot be altered, because of the read only nature of standalones (it has nothing to do with the nature of properties as such). Because of that, people typically have the mainstack be a splash screen that displays upon load, and then hide itself and launch the "meat and potatoes" stack (the real application) which was included as a file when it was compiled. 

So in short a property must be "gotten" first
   get the pBobsInfo of this stack -- the variable "it" now contains a copy of the property
or save the contents of the property in a variable
   put the pBobsInfo of this stack into vBobsInfo

Now you work with the variable like any other variable, and when you want to save it you "set" instead of "get"
   set the pBobsInfo of this stack to vBobsInfo

Simple, yes?


On Jun 13, 2011, at 2:06 PM, Joe Lewis Wilkins wrote:

> Personally, and all of you will think I'm crazy, I treat every app I create as if I were coding it in HC with a few added features such as color and large screens. Occasionally I run into a problem; but that is quite rare. That's the KISS approach to LC. (smile) Do I waste a lot of time? Perhaps, but I rarely have to look up anything in the Dictionary. Obviously, I've yet to use any Custom Properties. I still don't understand them. (frown) Actually, I've intentionally avoided them. They seem unnatural to me. It's that senior thing!
> Joe Lewis Wilkins
> Architect and Director of Product Development

More information about the Use-livecode mailing list