Some time ago, I experienced some unreliability when using "there is a" in conjunction with a control reference, never did figure out why. Now I always use "exists" when checking for Livecode objects and "there is a" for checking for files, folder.
Pete lcSQL Software <http://www.lcsql.com> On Fri, Apr 5, 2013 at 12:03 AM, Scott Morrow <sc...@elementarysoftware.com>wrote: > 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 sc...@elementarysoftware.com > office 1-800-615-0867 > ------------------------------------------------------ > > > > > > > > On Apr 4, 2013, at 11:25 PM, "Cal Horner" <calhor...@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@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > 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 > _______________________________________________ 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