Setting a property on a different card

Len Morgan len-morgan at
Wed Mar 16 11:56:03 EST 2005

I have a little app that uses a setup stack (the main-stack) and an "ID 
Card" stack where I have a single card with the layout of an employee 
badge.  If I load an image by hand, it works fine.  I am now trying to 
to print a batch of these badges on one sheet.  I can change the 
contents of the text fields that hold the name, title, etc. with no 
problem but I'm having trouble setting the file name for the image (they 
are stored in a separate folder on a shared drive.

My code is:

set the fileName of empPhoto of card 1 of stack "ID Card" to 

This gives me an error with "no 'to'".  This same approach works fine 
with "put" on the text fields (even going to a card on another stack).

What am I missing?  The documentation I've found doesn't seem to show 
how to do this across stacks - just the current stack.

I'm having one additional problem with this little app when I start it 
up:  As I said above, there is a main stack and a substack.  There is a 
PRINT button on the main stack that causes the "ID Card" stack's single 
card to print.  The problem I'm having is the first time I try this, I 
get an error saying the card has to be opened before I can print it.  If 
I open the Application Browser and double click on the ID Card line 
(which displays it on the screen), then I can go back and press the 
PRINT button and all is fine.  I have a preOpenStack handler on the main 
stack the has "start using stack "ID Card" on it but that doesn't seem 
to do the trick.  Any ideas?

Thanks in advance

len morgan

More information about the Use-livecode mailing list