The little object that wasn't there

Scott Morrow scott at elementarysoftware.com
Fri Apr 5 03:03:07 EDT 2013


What about

if there is a button "myButton" then
     or
if exists(button "myButton" of cd "myCard" of stack "myStack")

--
Scott Morrow
Elementary Software
(Now with 20% less chalk dust!)
web       http://elementarysoftware.com/
email     scott at elementarysoftware.com
office     1-800-615-0867
------------------------------------------------------







On Apr 4, 2013, at 11:25 PM, "Cal Horner" <calhorner at xtra.co.nz> wrote:

> I have a stack (like everyone else) and the 'Master' card contains all the
> objects needed to make a complete window.
> 
> Some of the buttons are needed for separate cards, but not all of the cards.
> When I need one I do the standard thing, push -> go to master card -> copy
> one of the buttons -> pop -> paste. Works a treat.
> 
> Here's my problem: 
> 
> How do I, programatically, check to see if the button exists, before I do
> the standard thing?
> 
> And how do I check for an existing button - programatically - before I
> delete a button that isn't there?
> 
> Surely there must be a command that handles that.
> 
> Cal
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list