Sometimes I'm baffled.
Alex Tweedly
alex at tweedly.net
Thu Jan 29 18:27:06 EST 2009
Ralf Bitter wrote:
> Alex,
>
> how about this:
>
> do "set the visible of" && param(i) && "to false"
>
OK, I see that works - but I still can't understand why
set the visible of param(i) to false
should not work.
In your other email, you said
> Once again: Use the do command, because the statement
> "set the visible of param(i) to false" consists partly of a return
> value of a function.
what's wrong with "... consisting partly of a return value of a
function..." ?
If I change the script to create a function of my own, e.g.
>
> local sTheCtl
>
> on mouseUp pMouseBtnNo
> put the target into tCtl
> put tCtl into sTheCtl
> flash tCtl
> end mouseUp
>
> on flash
> local i, p1
> repeat with i=1 to paramcount()
> -- set the visible of param(i) to false
> put param(i) into p1
> -- set the visible of p1 to false
> set the visible of myFunc() to false
> wait for 1000 milliseconds with messages
> set the visible of p1 to true
> end repeat
> end flash
>
> function myFunc
> return sTheCtl
> end myFunc
then the statement
set the visible of myFunc() to false
works just fine. So I don't think that "consisting of a return value" is
the complete explanation of the problem.
Thanks (also to Thomas - but indeed I didn't want to ever look at
param(0) ...)
-- Alex.
> Ralf
>
> On 27.01.2009, at 23:41, alex wrote:
>
>> [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
>> 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.
>>
>>
>>
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list