doesn't recognize the current card and stack
prothero at earthednet.org
Wed Feb 18 19:43:22 EST 2015
Thanks! I’ll do that. I parsed the “target” to get the source, then added it to each field command. Much easier to just set the default stack, tho. The description of “default stack” in the docs didn’t seem to do what I wanted, but perhaps I should have tried it before doing the other fixes.
> On Feb 18, 2015, at 4:24 PM, Phil Davis <revdev at pdslabs.net> wrote:
> Also, you can add "of me" to the end of the code refs to fields and other objects. That will identify them as belonging to the stack or card whose script is running.
> Like so:
> put myText into field “myField” of me
> Phil Davis
> On 2/18/15 4:07 PM, Scott Rossi wrote:
>> Try setting the defaultStack property to the stack that contains your field and data first.
>> Scott Rossi
>> Creative Director
>> Tactile Media UX/UI Design
>>> On Feb 18, 2015, at 3:53 PM, William Prothero <prothero at earthednet.org> wrote:
>>> I have one stack that calls another stack using:
>>> go to stack “myStack"
>>> In “myStack” I’ve got an openstack and open card handler in the first card of a stack that I’m opening. But, all of the references to fields, in my initialization code, require the complete card and stack name. If I put in a breakpoint and use the message box to do:
>>> put the short name of this stack
>>> put the short name of this card
>>> I get the current card I’m on. But, the references to the objects on that card require:
>>> put myText into field “myField” of cd “myCard” of stack “myStack”
>>> instead of
>>> put myText into field “myField”
>>> Is there a way I can get the code to recognize the stack it’s in?
>>> William A. Prothero
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> Phil Davis
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode