Sometimes I'm baffled.

alex alex at
Tue Jan 27 17:41:49 EST 2009

[Oops - originally I sent this from the wrong email address, so it is 
being held for approval. Here it is from the proper place - apologies in 
advance if it finishes up as a duplicate]

I don't understand why this doesn't work - has anyone got a spare clue 
they can lend me :-) ?

A simple stack, with one button, whose script is :
> on mouseUp pMouseBtnNo
>     put the target into tCtl
>     flash tCtl
> end mouseUp
> on flash
>     local i, p1
>     repeat with i=1 to paramcount()
>         set the visible of param(i) to false
>         wait for 1000 milliseconds with messages
>         set the visible of param(i) to true
>     end repeat
> end flash
This gives me
>  Runtime error    22:13:11
> Error 77:    Chunk: can't find object
> Hint :    Object: can't set object property
> Error at    char 25 of line 11 in handler mouseUp
> Code:    25
But if I change
>         set the visible of param(i) to false
> put param(i) into p1
> set the visible of p1 to false
(and make the same change later to "set the visible of p1 to true")
then it works properly. Why should this work and the former version not 
work ?

-- Alex.

More information about the Use-livecode mailing list