The Most Stupid Question Ever?

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

The Most Stupid Question Ever?

ELS Prothero via use-livecode
Please tell me why this doesn’t work:

on mouseUp

        put "start"

        wait for 5 seconds

        put "stop"

end mouseUp

“start” never appears in the message box and after 5 seconds, “stop” appears
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: The Most Stupid Question Ever?

ELS Prothero via use-livecode
On 11/8/20 6:57 PM, Roger Guay via use-livecode wrote:

> Please tell me why this doesn’t work:
>
> on mouseUp
>
> put "start"
>
> wait for 5 seconds
>
> put "stop"
>
> end mouseUp
>
> “start” never appears in the message box and after 5 seconds, “stop” appears

The wait command is blocking anything else from happening (like updating
the messagebox). After five seconds the messagebox gets "start" followed
immediately by "stop".

To allow events to happen while waiting try

on mouseUp
    put "start"
    wait for 5 seconds with messages
    put "stop"
end mouseUp

--
  Mark Wieder
  [hidden email]

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: The Most Stupid Question Ever?

ELS Prothero via use-livecode
On 11/8/20 8:02 PM, Mark Wieder via use-livecode wrote:
> On 11/8/20 6:57 PM, Roger Guay via use-livecode wrote:
>> Please tell me why this doesn’t work:

...and that is, btw, hardly a stupid question.
You want stupid you'll have to get in line after me.

--
  Mark Wieder
  [hidden email]

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: The Most Stupid Question Ever?

ELS Prothero via use-livecode
Thank you, Mark. You’re very kind! And very helpful. I do remember now how one needs to wait with messages.

Roger

> On Nov 8, 2020, at 9:05 PM, Mark Wieder via use-livecode <[hidden email]> wrote:
>
> On 11/8/20 8:02 PM, Mark Wieder via use-livecode wrote:
>> On 11/8/20 6:57 PM, Roger Guay via use-livecode wrote:
>>> Please tell me why this doesn’t work:
>
> ...and that is, btw, hardly a stupid question.
> You want stupid you'll have to get in line after me.
>
> --
> Mark Wieder
> [hidden email]
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: The Most Stupid Question Ever?

ELS Prothero via use-livecode
I have seen this sort of thing before with the wait command. Very frustrating. Apparently Livecode is not *strictly* single threaded.

Bob S


> On Nov 8, 2020, at 22:31 , Roger Guay via use-livecode <[hidden email]> wrote:
>
> Thank you, Mark. You’re very kind! And very helpful. I do remember now how one needs to wait with messages.
>
> Roger
>
>> On Nov 8, 2020, at 9:05 PM, Mark Wieder via use-livecode <[hidden email]> wrote:
>>
>> On 11/8/20 8:02 PM, Mark Wieder via use-livecode wrote:
>>> On 11/8/20 6:57 PM, Roger Guay via use-livecode wrote:
>>>> Please tell me why this doesn’t work:
>>
>> ...and that is, btw, hardly a stupid question.
>> You want stupid you'll have to get in line after me.
>>
>> --
>> Mark Wieder
>> [hidden email]
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: The Most Stupid Question Ever?

ELS Prothero via use-livecode
Not stupid. Wierder than you think.

Substitute "field 1" for the message box. Works just fine, like it ought to.

Craig

-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf Of Bob Sneidar via use-livecode
Sent: Monday, November 09, 2020 12:04 PM
To: How to use LiveCode <[hidden email]>
Cc: Bob Sneidar <[hidden email]>
Subject: Re: The Most Stupid Question Ever?

I have seen this sort of thing before with the wait command. Very frustrating. Apparently Livecode is not *strictly* single threaded.

Bob S


> On Nov 8, 2020, at 22:31 , Roger Guay via use-livecode <[hidden email]> wrote:
>
> Thank you, Mark. You’re very kind! And very helpful. I do remember now how one needs to wait with messages.
>
> Roger
>
>> On Nov 8, 2020, at 9:05 PM, Mark Wieder via use-livecode <[hidden email]> wrote:
>>
>> On 11/8/20 8:02 PM, Mark Wieder via use-livecode wrote:
>>> On 11/8/20 6:57 PM, Roger Guay via use-livecode wrote:
>>>> Please tell me why this doesn’t work:
>>
>> ...and that is, btw, hardly a stupid question.
>> You want stupid you'll have to get in line after me.
>>
>> --
>> Mark Wieder
>> [hidden email]
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: The Most Stupid Question Ever?

ELS Prothero via use-livecode
Ah! That would have to mean that script interaction with the message box is using send in time!

Bob S


On Nov 10, 2020, at 10:58 AM, Craig newman via use-livecode <[hidden email]<mailto:[hidden email]>> wrote:

Not stupid. Wierder than you think.

Substitute "field 1" for the message box. Works just fine, like it ought to.

Craig

-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf Of Bob Sneidar via use-livecode
Sent: Monday, November 09, 2020 12:04 PM
To: How to use LiveCode <[hidden email]<mailto:[hidden email]>>
Cc: Bob Sneidar <[hidden email]<mailto:[hidden email]>>
Subject: Re: The Most Stupid Question Ever?

I have seen this sort of thing before with the wait command. Very frustrating. Apparently Livecode is not *strictly* single threaded.

Bob S

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: The Most Stupid Question Ever?

ELS Prothero via use-livecode
Weirder of Weider???

R

> On Nov 10, 2020, at 12:03 PM, Bob Sneidar via use-livecode <[hidden email]> wrote:
>
>  Wierder than you think.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: The Most Stupid Question Ever?

ELS Prothero via use-livecode
I am switching between the forum discussion about this and here.

The plain old wait command, (without "with messages") works fine when the
target field is on another stack. So it not the fact that the field is not
"local". There is something about the message box itself, ostensibly just a
stack, that matters. This is not the first time that msg has been caught
acting oddly.

 I am actually gratified to know that LC works "normally", as long as msg is
not in the mix.

Craig

-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf
Of Roger Guay via use-livecode
Sent: Tuesday, November 10, 2020 3:55 PM
To: How to use LiveCode <[hidden email]>
Cc: Roger Guay <[hidden email]>
Subject: Re: The Most Stupid Question Ever?

Weirder of Weider???

R

> On Nov 10, 2020, at 12:03 PM, Bob Sneidar via use-livecode
<[hidden email]> wrote:
>
>  Wierder than you think.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: The Most Stupid Question Ever?

ELS Prothero via use-livecode
In reply to this post by ELS Prothero via use-livecode
"Send in time". Hmmm

So the line "put start"  is actually delayed until after the wait command,
er, starts,  and gets stuck there?

And if one uses "wait with messages" that stuck command can worm its way out
and  back into play?

So then LC knows when the message box is about to be the target, and
therefore acts differently than with any other container. The actual already
executed  command "put" is left stranded, unrequited, because the next line
in sequence, not yet executed,  has foreknowledge that the upcoming target
is the message box, and is girding itself to access it??

Odd.

Craig

-----Original Message-----
From: Craig newman [mailto:[hidden email]]
Sent: Tuesday, November 10, 2020 5:35 PM
To: 'How to use LiveCode' <[hidden email]>
Subject: RE: The Most Stupid Question Ever?

I am switching between the forum discussion about this and here.

The plain old wait command, (without "with messages") works fine when the
target field is on another stack. So it not the fact that the field is not
"local". There is something about the message box itself, ostensibly just a
stack, that matters. This is not the first time that msg has been caught
acting oddly.

 I am actually gratified to know that LC works "normally", as long as msg is
not in the mix.

Craig

-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf
Of Roger Guay via use-livecode
Sent: Tuesday, November 10, 2020 3:55 PM
To: How to use LiveCode <[hidden email]>
Cc: Roger Guay <[hidden email]>
Subject: Re: The Most Stupid Question Ever?

Weirder of Weider???

R

> On Nov 10, 2020, at 12:03 PM, Bob Sneidar via use-livecode
<[hidden email]> wrote:
>
>  Wierder than you think.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: The Most Stupid Question Ever?

ELS Prothero via use-livecode
In reply to this post by ELS Prothero via use-livecode
I vaguely remember long time, many moons, this came up. The upshot of the conversation is that because the message box is a stack file in it’s own right, certain features would only work this way, or it would interfere with other things if it didn’t work this way. I dunno, it was all all so hazy back then, what with having to watch for dinosaurs and large predators with teeth like swords.

Bob S


> On Nov 10, 2020, at 12:03 PM, Bob Sneidar via use-livecode <[hidden email]> wrote:
>
> Ah! That would have to mean that script interaction with the message box is using send in time!
>
> Bob S
>
>
> On Nov 10, 2020, at 10:58 AM, Craig newman via use-livecode <[hidden email]<mailto:[hidden email]>> wrote:
>
> Not stupid. Wierder than you think.
>
> Substitute "field 1" for the message box. Works just fine, like it ought to.
>
> Craig
>
> -----Original Message-----
> From: use-livecode [mailto:[hidden email]] On Behalf Of Bob Sneidar via use-livecode
> Sent: Monday, November 09, 2020 12:04 PM
> To: How to use LiveCode <[hidden email]<mailto:[hidden email]>>
> Cc: Bob Sneidar <[hidden email]<mailto:[hidden email]>>
> Subject: Re: The Most Stupid Question Ever?
>
> I have seen this sort of thing before with the wait command. Very frustrating. Apparently Livecode is not *strictly* single threaded.
>
> Bob S
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: The Most Stupid Question Ever?

ELS Prothero via use-livecode
In reply to this post by ELS Prothero via use-livecode


> On 10 Nov 2020, at 11:14 pm, Craig newman via use-livecode <[hidden email]> wrote:
>
> So then LC knows when the message box is about to be the target, and
> therefore acts differently than with any other container. The actual already
> executed  command "put" is left stranded, unrequited, because the next line
> in sequence, not yet executed,  has foreknowledge that the upcoming target
> is the message box, and is girding itself to access it??


"Spooky action at a distance"?


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: The Most Stupid Question Ever?

ELS Prothero via use-livecode
The message box is not a container. It’s a stack. A stack that tracks global properties, global variables, pending messages and stacks in use actively. It stands to reason then that it has to be either in the message path somehow. I’m not sure how that affects things, but I have noticed while attempting to track the contents of variables while a script was executing buy putting values in the msg that it doesn’t update until idle irregardless of whether I issue a wait or no, unless I use with messages.

Bob S


On Nov 11, 2020, at 3:04 AM, David V Glasgow via use-livecode <[hidden email]<mailto:[hidden email]>> wrote:

So then LC knows when the message box is about to be the target, and
therefore acts differently than with any other container. The actual already
executed  command "put" is left stranded, unrequited, because the next line
in sequence, not yet executed,  has foreknowledge that the upcoming target
is the message box, and is girding itself to access it??

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: The Most Stupid Question Ever?

ELS Prothero via use-livecode
Details on how the Message Box behaves, which explains the seeming
anomaly and is perhaps just fun to know (esp. if you ever want to write
a drop-in Message Box replacement):

https://forums.livecode.com/viewtopic.php?f=9&t=34903#p198108

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode