clone card command

Pascal phefti at club-internet.fr
Tue Nov 1 04:22:43 CST 2005


Hello,

Trying to make my first stack...

I want to create a new card that is  nearly the same as the one I am 
in, so I use the "clone this card" command in the script of a button.
The difference is that I want that two of the fields of the new card  
are now empty.


In my trial and errors I wrote the following script to the button
"on mouseup
	clone this card
	select text of field "citation"
	delete selected text
	select text of field "commentaire"
	delete selected text
end mouseup

And I obtained an error. I corrected the script the following way
"on mouseup
	clone this card
	select text of field "citation"
	delete
	select text of field "commentaire"
	delete
end mouseup

Seems to me it should work.

But it is not, a strange phenomenom occurs :  when I click the button 
with the second version the card is cloned but the script in the button 
of the new card is the first version, although it is the second version 
in the departure card.

Any explanation ?

I'm using Rev2.6.1 trial version on a 10.3.9X eMAc.

Oh by the way Rev keeps crashing with regularity so I have to use the 
"Forcer à quitter" (dont know the english version suppose "force to 
quit") item of the apple menu.

Pascal





More information about the use-livecode mailing list