Was: How to go to newly cloned card? shoudl be "Timing clone issues"
Thomas McGrath III
3mcgrath at adelphia.net
Sat Feb 7 21:05:41 EST 2004
Mark,
Actually, I ended up having to do the same. I forgot just before.
It seems to me that the handler starts with no card and then creates a
card but does not yet see it. so by leaving and going to another
function it now 'sees' the card and can act upon it. I think the send
in time just makes sure it has time to load the new card.
I have started to treat most of my scripts this way by putting my
functions outside of my running script. It seems to help in a lot of
situations.
Glad you figured it out.
Tom
On Feb 7, 2004, at 8:16 PM, Mark MacKenzie wrote:
> Hopefully, this is the final email on this subject. I am still having
> error problems with the suggested handler. Timing does seem to be an
> issue here after the cloning of a referenced card.
>
> What works is to break up the handler with a send in 30 milliseconds
> message as follows:
>
> 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.
>
> Regards Mark
>
> Mark MacKenzie wrote:
>
>> Great! That timing clue probably explains the "no such object" type
>> error message I was sometimes getting.
>>
>> I like the use of the "else" as well. An earlier iteration used such
>> a construction but as the frustrating day wore on I dropped back to
>> using more familiar simple constructions that just had to work. I
>> will incorporate both of these suggestions.
>>
>> Thank you Thomas and once again to Rob.
>>
>> Regards Mark MacKenzie
>>
>> Thomas McGrath III wrote:
>>
>>>
>>> On Feb 7, 2004, at 5:45 PM, Mark MacKenzie wrote:
>>>
>>>> My most recent iteration is:
>>>>
>>>> on mouseUp
>>>> if there is a card "Empty Card" of this stack
>>>> then
>>>> go card "Empty Card"
>>>
>>>
>>> -- end if
>>> -- if there is no card "Empty Card" of this stack
>>> -- then
>>> else
>>>
>>>> clone card "BulletWeightsMasterCard" of this stack
>>>> set the name of it to "Empty Card"
>>>
>>>
>>> go card "Empty Card" of this stack in 30 milliseconds
>>>
>>>> end if
>>>> end mouseUp
>>>>
>>> I had intermittent problems with the go card right after the setting
>>> of the name and was told to use the in 30 milliseconds which seems
>>> to work all the time for me. The else just replaces three lines of
>>> code. :-)
>>>
>>> Tom
>>>
>>> Thomas J. McGrath III
>>> SCS
>>> 1000 Killarney Dr.
>>> Pittsburgh, PA 15234
>>> 412-885-8541
>>>
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
Thomas J. McGrath III
SCS
1000 Killarney Dr.
Pittsburgh, PA 15234
412-885-8541
More information about the use-livecode
mailing list