Database: Passing values between cards in a stack

Ken Ray kray at sonsothunder.com
Sun Dec 7 23:38:06 EST 2003


The simplest way is to use global variables, although custom properties
work well also. If it is simple data, sometimes I use "the dialogData" -
a predefined global data container normall intended for passing data
between a stack and a modal dialog box (but it can be used anywhere).

Example:

(button on card 1)
on mouseUp
  set the dialogData to "My Data Here"
  go card 2
end mouseUp

(script of card 2)
on preOpenCard
  put the dialogData into fld 1
  -- puts "My Data Here" into fld 1
end preOpenCard

So you see, you have a bunch of options...

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Melvin Cox
> Sent: Sunday, December 07, 2003 8:06 PM
> To: use-revolution at lists.runrev.com
> Cc: melcox at hotmail.com
> Subject: Database: Passing values between cards in a stack
> 
> 
> What is the preferred methodology for passing values between 
> cards in a 
> stack?
> 
> I have successfully created two data entry/query forms (each 
> representing a 
> table in my database).  I would like to pass key values 
> between the cards, 
> placing these values within fields on the called card.
> 
> I am currently attempting to get this functionality via a 
> group of hidden 
> fields, replicated from my main card and an "on openCard" 
> statement which 
> populates the fields.  Is there a better (ie. more reliable 
> or more easily 
> implemented) way to do this?
> 
> Many thanks,
> 
> 
> Melvin Cox
> 
> _________________________________________________________________
> Browse styles for all ages, from the latest looks to cozy 
> weekend wear at 
> MSN Shopping.  And check out the beauty products! 
http://shopping.msn.com

_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list