Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Annoying intermittent Window sizing problem with Genero V2+  (Read 11206 times)
David H.
Posts: 158


« on: September 26, 2008, 01:28:09 pm »

Hi all,

As more of our clients switch to Genero V2+ we are getting reports of (and on occasions noticing ourselves) an annoying intermittent problem which has proven difficult to track down so far, so I'd thought I'd see if anybody on the forum has any suggestions. We have a popup menu which uses the following style:-

 
Code
  1. <Style name="Window.SimpleMenu">
  2.    <StyleAttribute name="windowType" value="modal"/>
  3.    <StyleAttribute name="border" value="normal"/>
  4.    <StyleAttribute name="sizable" value="no"/>
  5.    <StyleAttribute name="actionPanelPosition" value="none"/>
  6.    <StyleAttribute name="ringMenuPosition" value="none"/>
  7.    <StyleAttribute name="defaultStatusBar" value="1"/>
  8.    <StyleAttribute name="windowOptionClose" value="yes"/>
  9.    <StyleAttribute name="statusBarType" value="none" />
  10.    <StyleAttribute name="windowState" value="normal" />
  11.    <StyleAttribute name="position" value="center" />
  12.    <StyleAttribute name="startMenuPosition" value="poptree" />
  13.    <StyleAttribute name="startMenuShortcut" value="control-shift-L" />
  14.    <StyleAttribute name="startMenuSize" value="small" />
  15.  </Style>

Normally menu's of this style appear correctly. However every so often (sometimes days, other times just minutes) the window gets resized and we have been unable to find what causes this.  I'm attaching a couple of screen shots to show what happens. Since the window is not resizable I'm at a loss to explain what could cause its stored off sizing to change every so often. FYI we've never seen this happen with v1.3x either...

Any thoughts/suggestions would be most welcome.

David





* before_resize.JPG (25.84 KB, 960x600 - viewed 2060 times.)

* after_resize.JPG (12.98 KB, 371x145 - viewed 2056 times.)
Reuben B.
Four Js
Posts: 1119


« Reply #1 on: September 28, 2008, 11:33:47 pm »

David,

You mention that the window shouldn't be resizable, did you consider adding the following styleattribute.  This should at least stop the annoying intermittent problem occuring.

<StyleAttribute name="forceDefaultSettings" value="1" />


One possibility for the problem occuring although it is unlikely as I would expect it to occur with 1.3 as well, but I'll mention it as you may have made a change to your app between 1.3 and 2 (and it is interesting) is that you have a window and/or form with the same name used elsewhere in your application.  The stored settings are saved away in the registry by window name (for x,y, state), and by form name (for height,width) so if you have 2 or more instances using the same window name and/or 2 or more instances using the same form name then the settings will be shared between the 2 or more windows and/or forms.

Run this code and you'll hopefully see that if you reposition and move the first window that appears, that these stored settings are then applied to the second window as it shares the same name even though its contents maybe completely different

Code
  1. MAIN
  2.   OPEN WINDOW w1 WITH FORM "dir1/form"
  3.   MENU ""
  4.      ON ACTION accept
  5.         EXIT MENU
  6.   END MENU
  7.   CLOSE WINDOW w1
  8.  
  9.   OPEN WINDOW w1 WITH FORM "dir2/form"
  10.   MENU ""
  11.      ON ACTION accept
  12.         EXIT MENU
  13.   END MENU
  14.   CLOSE WINDOW w1
  15. END MAIN



If the problem continues, keep an eye on the values in the registry.  One issue a few years ago was reported as a column width suddenly being too small, when in actual fact the column width was decrementing by 2 pixels each time the window was opened but of course it was only reported once it got too small.   I'd also be curious to see the .per.

Reuben

PS You describe it as a popup menu, it looks like more like a DISPLAY ARRAY to me.  Did you consider a MENU STYLE="popup" for what I am guessing is a library function? 

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
David H.
Posts: 158


« Reply #2 on: September 29, 2008, 11:10:27 am »

Hi Reuben.

Thanks for responding. Yes I was aware of forceDefaultSettings but have not used it yet as I wanted to a) isolate the cause of the issue and b) let users control the position where the window is opened. I may however be forced to adopt this as its definitely the lesser of two evils..!

I'm also confident that both the window (menu_w) and form (menu14s) are only used in 1 function in the application, so we don't have more than one instance affecting another...

I will have a go at trying to monitor the registry using Regmon. The problem is that the error can occur very infrequently and try as we might nobody has yet managed to come up with steps to reproduce the problem. It definitely does not occur with Genero v1.32x though...

I'm am attaching the PER file to satisfy your curiosity :-)

Kind regards,

David

p.s. I don't think I've ever played with a "popup" menu before. You are right the implementation of this context sensitive menu is indeed using a data driven DISPLAY ARRAY statement. In fact all our menu's are implemented by DISPLAY ARRAY's...

p.p.s. How I enjoyed retyping this message when the previous version got wiped out by the forum software when I forgot to zip the attachment and clicked post...

* MENU14S.ZIP (0.58 KB - downloaded 1055 times.)
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines