Change the name of a card

Klaus on-rev klaus at major.on-rev.com
Mon Nov 22 11:07:53 EST 2010


Hi Scott,

> Probably very simple to do.
> 
> I've got a field that is part of a background group, and so will be on every new card created in this stack.
> 
> I want to change the name of the card to the contents of this field after the user has typed something into the field.
> 
> So I presume the script for the field would start with "On Closefield", but then how do I actually change the name of the card to be the contents of the field?

put this into the script of these field(s):
on closefield
  put me into tNewCardName
  set the name of this card to tNewCardName
end closefield

me = the field that is being closed
this card = the card you are currently on :-)

Of course you could and should check if tNewCardName is empty or whatever might cause 
inconvenience furthermore :-)

> Thanks,
> --Scott

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major.on-rev.com





More information about the use-livecode mailing list