Changing a Field's contents when a global variable is changed

Len Morgan len-morgan at crcom.net
Mon Mar 5 13:34:44 EST 2007


Is there a way to have the contents of a field on a card change when a 
global variable (in this case an array variable) is changed?

I have a multiple card application that I'm converting from Tcl.  One of 
the things I like about Tcl is that a field has a parameter called 
-textvariable) that points to a location that holds the contents to be 
displayed in that field.  If you change the contents of the field, what 
you are really changing is the global variable and vis-versa.  This 
allows me to put a field on several cards (in different locations on 
each card) and when I read a new record, I just put the results into a 
global array.  I'd like to try and do the same thing in Rev if it's 
possible.

I'd like to avoid writing a script in the "readrecord" function that has 
to know the names of every field on every card that needs to show that 
information, and then looping through and setting the text of each of 
those fields to the contents of the global variable.  This seems like it 
would be very hard to maintain system.

Thanks,

Len Morgan



More information about the use-livecode mailing list