Re: wait with messages revisited.

2004-11-02 Thread K


Did that to ensure the code would not be misunderstood.  I have found that using that 
using "if gblA then " confused many newbie developers.  I find quite easy to 
understand but I was attempting to code to the lowest denominator.


-==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-
Disclaimer:

Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental. 
Any resemblance between the above and my own views is non-deterministic.

 The question of the existence of views in the absence of anyone to hold
them
is left as an exercise for the reader. The question of the existence of
the reader
 is left as an exercise for the second god coefficient. 
(A discussion of non-orthogonal, non-integral polytheism is beyond the
scope of this article.)



 --- On Mon 11/01, Dar Scott < [EMAIL PROTECTED] > wrote:
From: Dar Scott [mailto: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Mon, 1 Nov 2004 14:59:58 -0700
Subject: Re: wait with messages revisited.

On Nov 1, 2004, at 9:24 AM, K wrote:>if gblA is true then return 
trueAre you actually doing this?Or this? if gblA then exit 
repeatDar Dar Scott 
Consulting http://www.swcp.com/dsc/ Programming 
Services___use-revolution
 mailing list[EMAIL 
PROTECTED]http://lists.runrev.com/mailman/listinfo/use-revolution

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: wait with messages revisited.

2004-11-01 Thread Dar Scott
On Nov 1, 2004, at 9:24 AM, K wrote:
   if gblA is true then return true
Are you actually doing this?
Or this?
if gblA then exit repeat
Dar

Dar Scott Consulting
http://www.swcp.com/dsc/
Programming Services

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: wait with messages revisited.

2004-11-01 Thread K

I posted the below some days ago.  I have further questions and further infomation.

In my testing of "wait for X seconds with message":

Example code:

global gblA
global gblB

[Button A]
on mouseUp 

  repeat forever
   put "Waiting A" & return after field "status"
   if gblA is true then return true
   wait for 1 seconds with messages
  end repeat 

  put "A completed" & return after field "status"
  
end mouseUp

[Button SignalA] 
on mouseUp 
  put "Signaled A" & return into field "status"
  put true into gblA
end mouseUp

[Button SignalB]
on mouseUp
  put "Signaled B" & return into field "status"
  put true into gblB
end mouseUp

[Button B]
on mouseUp 

  repeat forever
   put "Waiting B" & return after field "status"
   if gblB is true then return true
   wait for 1 seconds with messages
  end repeat 
  
  put "B Completed" & return after field "status" 

end mouseUp

Event   Output
[Clicked A] Waiting A
[Clicked B] Waiting B
[Clicked SignalA]   
[Clicked SignalB]   B completed
A completed

This is not the case on Win32 is different.  How is this supposed to work?  The 
documentation does not refer to any dependency for "wait  with messages" or even 
"wait until x with messages".  I am confused!!!


>Okay, some time ago everyone assisted me with understanding how "wait with >messages" 
>functions. I am still a bit confused.
>
>In my testing I found the following.
>
>Example code:
>
>[Button A]
>global evtA
>
>on mouseUp
>put "Waiting on event (A)" & cr into field edtStatus
>wait until evtA with messages
>put "Event (A) signaled" & cr into field edtStatus
>end mouseUp
>
>[Button B]
>
>global evtB
>
>on mouseUp
>put "Waiting on event (B)" & cr into field edtStatus
>wait until evtB with messages
>put "Event (B) signaled" & cr into field edtStatus
>end mouseUp
>
>[Button Clear]
>
>global evtA
>global evtB
>
>on mouseUp
>put false into evtA
>put false into evtB
>end mouseUp
>
>[Button SignalA]
>
>global evtA
>
>on mouseUp
>put true into evtA
>end mouseUp
>
>[Button SignalB]
>
>global evtB
>
>on mouseUp
>put true into evtB
>end mouseUp
>
>
>
>Test
>Click Clear Output: Nothing
>Click A Output: Waiting on event (A)
>Click B Output: Waiting on event (B)
>Click SignalA Output: Nothing
>Click SignalB Output: Waiting on event (A)
>Output: Waiting on event (B)
>
>This means that each wait is dependent on the previous A cannot be signaled >until B 
>completes. Is this the intended result?

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


wait with messages revisited.

2004-10-28 Thread K

Okay, some time ago everyone assisted me with understanding how "wait with messages" 
functions.  I am still a bit confused. 

In my testing I found the following.

Example code:

[Button A]
global evtA 

on mouseUp
  put "Waiting on event (A)" & cr into field edtStatus
  wait until evtA with messages
  put "Event (A) signaled" & cr into field edtStatus
end mouseUp

[Button B]

global evtB

on mouseUp
  put "Waiting on event (B)" & cr into field edtStatus
  wait until evtB with messages
  put "Event (B) signaled" & cr into field edtStatus
end mouseUp

[Button Clear]

global evtA
global evtB

on mouseUp
  put false into evtA
  put false into evtB
end mouseUp

[Button SignalA]

global evtA

on mouseUp 
  put true into evtA
end mouseUp

[Button SignalB]

global evtB

on mouseUp
  put true into evtB
end mouseUp



Test 
Click Clear Output: Nothing 
Click A Output: Waiting on event (A)
Click B Output: Waiting on event (B)
Click SignalA   Output: Nothing
Click SignalB   Output: Waiting on event (A)
Output: Waiting on event (B)

This means that each wait is dependent on the previous A cannot be signaled until B 
completes.  Is this the intended result?


NOTE: I am using Revolution 2.2.1 on OS X since 2.5 delete my objects without warning.


Kevin



-==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-
Disclaimer:

Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental. 
Any resemblance between the above and my own views is non-deterministic.

 The question of the existence of views in the absence of anyone to hold
them
is left as an exercise for the reader. The question of the existence of
the reader
 is left as an exercise for the second god coefficient. 
(A discussion of non-orthogonal, non-integral polytheism is beyond the
scope of this article.)



___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution