Page 1 of 1

Clone behaving oddly

Posted: Sun Jan 10, 2010 9:41 pm
by Bill Pittman
Hi,

I'm cloning cards in one of my stacks. The scripts have been working fine, but 2 days ago the behavior of clone changed on me. I made no modifications to the scripts, but when the scripts execute clone now, the only card that gets cloned is the 1st card in the stack. I can manually reorder the cards, and it is always the first card that gets cloned. The only change I made to the stack 2 days ago was to add a data grid to one of the cards. No other changes. I can mark cards, sort cards, manually go to a specific card, and clone still copies the first card only. If I clone using the message window, it works fine. Any thoughts on why this might be happening? I'm using Rev Studio 4/950 Mac.

Thanks.
-Bill

Re: Clone behaving oddly

Posted: Mon Jan 11, 2010 12:42 pm
by Mark
Hi Bill,

What is your cloning script?

Best,

Mark

Re: Clone behaving oddly

Posted: Mon Jan 11, 2010 8:08 pm
by Bill Pittman
Hi Mark,

I have tried several variations. Here is one example:

put the short name of this card into tName
if (word 1 of tName is "Task") then
lock screen
sort cards of stack "myStack" numeric by the number of this card
put the number of last card into tNumber
clone this card

This is executed from the card I wish to clone. It clones the first card in the stack. It works in a previous version of the stack.

I also tried marking the cards:

unmark all cards
lock screen
mark cards where word 1 of the short name of this card is "Task"
sort marked cards by the short name of this card
go to last marked card
put word 3 of the short name of this card into tNumber
clone this card

This also results in card 1 being cloned. Both of these scripts find the right card in previous versions of the stack.

Thanks for the assist.
-Bill

Re: Clone behaving oddly

Posted: Tue Jan 12, 2010 2:50 pm
by Mark
Hi Bill,

Why do you have to sort the cards first? What happens if you just clone this card and to everything else aftewards? Would it still always close the first card of your stack? What do you get if you add a line "put the id of this cd" in your script, do you get the correct id in the message box?

Best,

Mark

Re: Clone behaving oddly

Posted: Wed Jan 13, 2010 4:36 pm
by Bill Pittman
Hi Mark,

If I clone first, it works. Clone stops working when I moved to another card, and then clone. I can step through the script and see it going to the correct card, but as soon as I call clone, the first card just pops up and that is what gets cloned. I worked around it, but I'm still puzzled why it works in one stack and not in another. Based on the docs, clone should work on whatever card is the current card.

Thanks for the assist.
-Bill