Sometimes I'm baffled.

alex alex at tweedly.org
Tue Jan 27 16:19:59 CST 2009


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
to
> 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 ?

Thanks
-- Alex.






More information about the use-livecode mailing list