strange clone behaviour: bug?
Wouter
wouter.abraham at pi.be
Tue Jul 13 07:17:32 EDT 2004
> strange clone behaviour: bug?
> • From: andreas
> • Date: Tue, 13 Jul 2004 01:31:20 -0700
>
> Hi
>
>
> I've read some articles in metacard lists about clone behaviour.
> For myself I've now a strange error that I can't solve:
>
>
> From a main stack A I call a substack B which has the handler
> "klonen". The handler "klonen" in substack B has the simple script:
>
>
> on Klonen
> put ZuKopieren & "_" & Schuelername into NeuerName
> go card ZuKopieren
> clone card ZuKopieren
> set the name of it to NeuerName
> end Klonen
If we must relay on the script above then:
ZuKopieren is not initialized (name), it will be an empty var.
There will be no error dialog, it will only return "no such card"
and going nowhere.
Cloning a "" card will cause an error dialog, so you exit on this
line.
Next if Schuelername is not initialized, you wil only be adding an
underscore to the name
>
>
> On the line "clone card ZuKopieren" the script exits without an error
> message!
so change your handler into something like this:
on Klonen ZuKopieren
put < some name> into Schuelername
put ZuKopieren & "_" & Schuelername into NeuerName
go card ZuKopieren
clone card ZuKopieren
set the name of it to NeuerName
end Klonen
>
> This script boiled down from a far more complicated script, which
> showed the
> same error.
> This happens with the newest Rev built in MacOSX.
>
> Because my project relies heavily on the clone function help is very
> welcome!
>
>
> Andreas Stämpfli
>
>
HTH
Greetings,
WA
More information about the use-livecode
mailing list