On 10/15/16 9:53 AM, Richard Gaskin wrote:
We have more posts here exploring its definition than about problems
relating to its behavior.

The discussion was very helpful for me, I've never been clear about when I need to specifically set the defaultstack, and usually I only figure it out when errors happen. Then I'd set it specifically, still never understanding why I had to.

I do use the defaultstack whenever I have many actions that need to apply to a stack. If I'm only referring to an object once or twice I use a long ID or name, but if I need to do lots of stuff it's way easier to have a defaultstack.

One good example is the stack-builder tool I wrote for a client, which creates and updates stacks. During creation there are hundreds of commands to create objects, apply scripts and properties, import images, etc. Using long references in every line of that code would be burdensome.

Until now I couldn't understand why "create stack x" required me to set the defaultstack to the newly created one. Now I do.

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to