>>
APLDN Home

>>
Events

>>
Trainings

>>
APL Books

>>
APLDN Links

>>
Discussion Groups

>>
Downloads

>>
Articles

>>
Library

>>
Learning Tools

>>
APLDN User IO

>>
APL2000.com




Bug Reports

Author Thread: The event ViewChange does not fire
Nicolai.Ohm
The event ViewChange does not fire
Posted: Tuesday, October 10, 2006 6:33 AM (EST)

The event ViewChange does not fire always, when the view changes due to resizing of the grid.

 

Please find enclosed a function that illustrates the problem


Error_grid_ViewChange event;debug;fm;shape;t;ŒWSELF
–(debug„1)/'''start: ',event,' - '',ŒWSELF'

:select event

:case 'XViewChange'
   '   view in XViewChange ',ŒWI'view'

:case 'Resize'
   '   view before resizing ',ŒWI'.grid.view'
   ŒWI'.grid.where'(0 0,ŒWI'extent')
   ŒWI'Defer' "'   view after resizing ',ŒWI'.grid.view'"
 © ŒWI'Defer' "ŒWSELF„'fm1.grid'ªError_grid_ViewChange'XViewChange'"  © workaround

:else
   ŒWSELF „ fm „ 'fm1'ŒWI'Create' 'Form'('visible'¯1)
   ŒWI'onResize' "Error_grid_ViewChange'Resize'"
   ŒWSELF „ ŒWI'.grid.Create' 'ActiveControl APL2000.Grid'
   ŒWI'onXViewChange' "Error_grid_ViewChange'XViewChange'"
   shape „ 50 30
   ŒWI'Set'('xRows'(1œshape))('xCols'(2œshape))('xPages'3)
   ŒWI'xView'(36 23 14 7)
   fm ŒWI'Resize'
   0 0½fm ŒWI'Wait'

:endselect

–debug/'''end:   ',event,' - '',ŒWSELF'

 

Start with
Error_grid_ViewChange ''
which will create a form and a grid. Move the thumb of both scrollbars to the last row and column (see enclosed JPEG). Now maximize the window ´(by clicking on the control-menu box in the title bar). The grid will be resized and the view will change. However the xViewChange does not fire as you can see in the log that is generated in the APL session. Now restore the form to it original size and the xViewChange will fire. As the thumbs are now somewhere in the middle of the scroll bars maximizing the window will now fire the xViewChange event. Only when the thumbs are in last row or column the xViewChange isn’t there while maximizing the form.

 

 

 

I need this because I’m using the xViewChange event to dynamically add and delete columns (comparable to Excel where the sheet is enlarged while you are scrolling). I also have to mention that I found a workaround by putting a Defer statement in the resize handler that calls the xViewChange event.



Attached file: Error_grid_ViewChange.jpg


Comments:

Author Thread:
Support
The event ViewChange does not fire
Posted: Tuesday, February 20, 2007 8:13 AM (EST)

We have confirmed that this problem is a bug.  Thank you for reporting it.

 

APL2000 Support

     



APL2000 Official Web Site

When we try to pick out anything else in the Universe, we find it hitched to everything else in the Universe.
-- John Muir

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