Was: How to go to newly cloned card? shoudl be "Timing clone issues"

J. Landman Gay jacque at hyperactivesw.com
Sat Feb 7 20:51:22 EST 2004


On 2/7/04 7:16 PM, Mark MacKenzie wrote:

> on mouseUp
>  if there is a card "Empty Card" of this stack
>  then
>    go card "Empty Card"
>  else
>    clone card "BulletWeightsMasterCard" of this stack
>    set the name of this card to "Empty Card"
>    --    go card "Empty Card" in 30 milliseconds   -- Rev 2.1.2 throws 
> an error highlighting the 30 with this construction
>    send marchingOrder to me in 30 milliseconds
>  end if
> end mouseUp
> 
> on marchingOrder
>  go card "Empty Card"
> end marchingOrder
> 
> This works and does so consistently without error.  Odd little work around.

Seems to me you should be able to just stop after the "clone" command 
and you will already be on that card. Why do you need to "go" to it?

If you are cloning a card that isn't the current one, then yes, the 
cloned card will appear after the original and you may not be on it. If 
that is the case, then naming "this card" is going to name the current 
card instead of the newly cloned one. Use "set the name of IT..." which 
will name the remote clone. So, I'd do this:

if there is a card "empty card" then
   go card "empty card"
else
   clone card "BulletWeightsMasterCard"  -- no need to specify the stack
                                         -- if it is the current stack
   set the name of it to "empty card"
   go cd it
end if

That doesn't work?

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com


More information about the use-livecode mailing list