I can't refer to it as a button because this is a general purpose function that has to deal with any type of control, not just a button. But I did try doing that in the message box and got the same error.
It's been working fine for months and fails just on this one button so yes, there's definitely something different about this particular situation - I just can't figure out what it is! The only thing that might be a clue is that this button is on a card in the Data Grid Templates stack of my application but as far as I know, that's just a stack like any other. Pete Haworth On Mar 25, 2011, at 1:06 PM, Bob Sneidar wrote: > Hmmm... not sure but this works fine for me. > > on mouseUp pMouseBtnNo > breakpoint > put the id of me into theID > put the short name of control id theID > end mouseUp > > I get the short name of the button in the message box. Seems like something > else is not compiling there. > > Bob > > > On Mar 25, 2011, at 12:46 PM, Peter Haworth wrote: > >> I have a function that returns information about a control which takes the >> control's short ID as a parameter. This has been working fine for a long >> time but has suddenly started to throw a run time error for one specific >> control. >> >> The statement "put the short name of control ID pid into myControlName" >> where id is the parameter containing the ID returns the error "No such >> Object near "1076" (1076 is the control ID in pid). >> >> I can clearly see in the application browser and Inspector dialog that there >> is a button with ID 1076 in a substack of the main stack. If I use the >> message box to execute "put the short name of control ID 1076", I get the >> same error. But if I execute "put the short name of control ID 1076 of >> stack <mysubstackname>", I get the correct result. >> >> According to the dictionary, the ID of a control is unique within a main >> stack so I can't figure out why this doesn't work without qualifying the ID >> with the substack name. I tried putting an "answer information" right >> before the offending line to display the defaultStack in case something >> strange was happening to the defaultStack property but it is set to the >> correct stack name. >> >> Any ideas? >> >> >> Pete Haworth >> >> >> >> >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> [email protected] >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
