>>
APLDN Home

>>
Events

>>
Trainings

>>
APL Books

>>
APLDN Links

>>
Discussion Groups

>>
Downloads

>>
Articles

>>
Library

>>
Learning Tools

>>
APLDN User IO

>>
APL2000.com




Bug Reports

Author Thread: Deferred onSelect
davin.church
Deferred onSelect
Posted: Friday, September 30, 2005 4:42 PM (EST)

Ok, I'm seeing some unexpected behavior - maybe someone can tell me if it's a bug or not...

 

Situation:  A 'Listview' object can have it's 'value' set under program control.  Usually, this fires the Listview's 'onSelect' event.  However, the event seems to be firing as if it were using []WI 'Defer' (after the calling function finished) when I expect it to be firing as would a []WI 'Event' (immediately, during execution).

 

A demonstration workspace is attached.  (I'm testing under Win98 w/APLv5.2.10.)  Can anyone tell me if I'm imagining things, or if it's supposed to work this way?



Attached file: EVENTTEST.w3


Comments:

Author Thread:
Support
Deferred onSelect
Posted: Friday, October 14, 2005 2:47 PM (EST)
The behavior of the listview's onSelect event handler is intentional.  The reason being that the onSelect event handler, by design, waits for idle process for the event handler to fire, which in this instance is after the completion of the button's onClick event handler.  This explains why the button's onClick event handler is not on the execution stack when the stack is queried in the listview's onSelect event handler.  Not to worry, it is possible to achieve the results you're after.  To do this, you will need to induce idle process into APL+WIN, which is possible with executing Œwgive with a right argument of 0.  This should be be done immediately after assigning the value property for the listview in the button's onClick event handler.

APL2000 Support

     

davin.church
Deferred onSelect
Posted: Sunday, October 16, 2005 9:04 PM (EST)
Thanks for tracking this down. I'm amazed at this rather odd behavior, since it seems to be the only thing in APL's GUI system that works like this. If it can't be changed due to some underlying bad behavior by Windows, then I hope we can at least get this exceptional behavior documented.

     



APL2000 Official Web Site

Make others happy and joyful. Your happiness will multiply a thousand fold.
--- Swami Sivananda

APLDN Home   |    |  Events   |  Trainings   |  APL Books   |  APLDN Links   |    |  Discussion Groups   |    |  Downloads   |  Articles   |  Library   |  Learning Tools   |  APLDN User IO   |  APL2000.com   |