>>
APLDN Home

>>
Events

>>
Trainings

>>
APL Books

>>
APLDN Links

>>
Discussion Groups

>>
Downloads

>>
Articles

>>
Library

>>
Learning Tools

>>
APLDN User IO

>>
APL2000.com




Bug Reports

Author Thread: MDI application flickers with popup form that contains two selectors
Nicolai.Ohm
MDI application flickers with popup form that contains two selectors
Posted: Friday, September 29, 2006 5:39 AM (EST)

Here is the description f the bug:
A popup form in an MDI-application is created that contains a first selector. On one page of the first selector a second selector is created. When reopening the popup form, the MDI application flickers (actually it’s the activeform that flickers).


This only happens, when a selector is a child of another selector. The MDI application will not flicker, when the selector does not have any child selectors.


I found a workaround: Set the value of the first selector to the index of the page with the second selector before opening the popup form and the MDI application will not flicker (you can even then reset the value of the first selector in the onOpen event of the popup form to whatever page index you like). However, when the first selector has a third selector on another page, the workaround will not work and the flickering will reappear.

 

 

Please find enclosed a function that illustrates the problem:
It creates an MDIForm with two menus and the popup form.


Click on the first menu (Here’s the bug). The popup window will appear. Close it and click a second time on the menu. Now the flickering starts.


Click on the second menu (This is OK): It will open the same popup form w/o flickering

 

Error_sel_Flickering;fm;mdi;shape;t;ŒWSELF;sel
ŒWSELF „ mdi „ 'MDI'ŒWI'Create' 'MDIForm'('visible'¯3)

ŒWSELF „ fm „ ŒWI'.fm1.New' 'Form'('visible'3)
ŒWI'onResize' "ŒWI'.grid.where'(0 0,ŒWI'extent')"
t „ ŒWI'menu1.Create' 'Menu'('onClick' "'fmPopup'ŒWI'.Sel.value'1ª0 0½'fmPopup'ŒWI'Wait'")('caption' 'Here''s the bug')
t „ ŒWI'menu2.Create' 'Menu'('onClick' "'fmPopup'ŒWI'.Sel.value'('fmPopup'ŒWI'.Sel.pg3.order')ª0 0½'fmPopup'ŒWI'Wait'")('caption' 'This is OK')


ŒWSELF „ ŒWI'.grid.Create' 'ActiveControl APL2000.Grid'
shape „ 50 30
ŒWI'Set'('xRows'(1œshape))('xCols'(2œshape))('xPages'3)
ŒWI'xNumber'(1‡¼1œshape)(1‡¼2œshape)(?shape½10000)

fm ŒWI'Resize'

ŒWSELF „ 'fmPopup'ŒWI'Create' 'Form' 'Hide'('border'2 16 256)
© ŒWI'onOpen' "ŒWI'.Sel.value'1"
sel „ ŒWI'.Sel.New' 'Selector'('style' 2)
t „ sel ŒWI'.pg1.New' 'Page'
t „ t ŒWI'.l1.New' 'Label'('caption' 'this is the first selector')
t „ sel ŒWI'.pg2.New' 'Page'
t „ sel ŒWI'.pg3.New' 'Page'
ŒWSELF „ t ŒWI'.Sel.New' 'Selector'('style' 2)
t „ ŒWI'.pg1.New' 'Page'
t „ t ŒWI'.l1.New' 'Label'('caption' 'this is the second selector')
© t „ sel ŒWI'.pg4.New' 'Page'
© t „ sel ŒWI'.pg5.New' 'Page'
© t „ t ŒWI'.Sel.New' 'Selector'('style' 2)


0 0½mdi ŒWI'Wait'

 

 

 

 

Just on another issue:
Is there a way to determine that the focus comes from outside the APL+Win application..
Let’s say, the user opens an APL+Win application and then does some work in another unrelated application (let’s say email). How can I track it when the user comes back to the APL+Win application? Is there an event or property available that tells me that the user has been around outside my APL+Win application?

 


Comments:

Author Thread:
davin.church
MDI application flickers with popup form that contains two selectors
Posted: Friday, September 29, 2006 11:02 AM (EST)

On your focus issue...

 

it would be tricky, but you might be able to track un-focusing events.  If you see an onUnfocus without seeing an onExit for an APL control, then you've probably gone to another application.

 

But there might be a Windows API event that could do that more directly.

 

Davin

     



APL2000 Official Web Site

You must be the change you wish to see in the world.
--- Mahatma Ghandi

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