Page 2 of 2

Re: Send variable from one card to another card?

Posted: Mon May 30, 2011 1:25 am
by BvG
he meant you can't go to the same stack that you're currently showing, making it show paralell in a second window. it's one stack per window. however, you can easily make a second stack, and then use that as your edit mask, no?

Re: Send variable from one card to another card?

Posted: Mon May 30, 2011 3:32 am
by jesse
BvG,

How would I send the variable CurrentID from the one stack where my datagrid is to a new stack for the "Edit Window"?

Code: Select all

go to stack "Edit Card" CurrentID
??

Re: Send variable from one card to another card?

Posted: Mon May 30, 2011 5:03 am
by jesse
Nevermind I think I got it. TO simple I just created a sub stack and then call the global variable into a field like this.
I actually changed to theDataA as the variable which is the array of columns for from the row selected in the datagrid.
Then it simply preloads the Name of the product into a field productName.

Code: Select all

on preOpenStack
global theDataA
answer  theDataA["ID"]
put theDataA["Name"] into the field "productName"
end preOpenStack
I assume this is the correct method.

Re: Send variable from one card to another card?

Posted: Mon May 30, 2011 12:29 pm
by Klaus
Hi Jesse,

yes, this is the correct way to go!

A "global" variable is "visible" in ALL cards of all stacks and substacks
that you open in your current LiveCode session!


Best

Klaus

Re: Send variable from one card to another card?

Posted: Thu Jun 02, 2011 2:22 am
by jesse
Thanks Klaus!