(mostly to solidify the memory for myself) set the text of tObjectReference gives the engine enough clue to know that you're setting a property (set the text of) so the next thing needs to be an object reference. put "fred" into tObjectReference is ambiguous because you can put fred into tname or any variable name, so the engine can't know when to eval or not eval for an object reference. So it defaults to the most likely scenario, putting a value into a variable.
On Tue, Jan 24, 2017 at 10:46 PM, William Prothero via use-livecode < use-livecode@lists.runrev.com> wrote: > Agreed. Please enlighten. I had this problem when getting the controls in > a group, parsing out the fields, then trying to get the contents. I did > this because I had some fields named the same, but they were in different > groups, so I wanted only the one in the specified group. > Bill > > > On Jan 24, 2017, at 7:15 PM, dunbarx via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > > I am not sure what you mean. > > > > Both lines of code seem fine. What is not working? > > > > Craig Newman > > > > > > > > -- > > View this message in context: http://runtime-revolution. > 278305.n4.nabble.com/Storing-and-object-reference-in-a-var- > tp4711908p4711919.html > > Sent from the Revolution - User mailing list archive at Nabble.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 > > > _______________________________________________ > 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