28/10/13 14:36 Filed in: Livecode
In live code you can already toggle object properties like “visible” without knowing the current state of the object like so :
set the visible of img “imageObject” to not the visible of img “imageObject”
But this can be tedious to write again and again, so for brevity, add this short handler to the stack script :
on toggle pProperty, pObject
set the pProperty of pObject to not the pProperty of pObject
And in future you can now toggle properties of any object like so :
toggle "visible", “img imageObject"
Make sense..? Read More...