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: Form Image wont show (BDL 2.30.03, GDC 2.30.04)  (Read 7729 times)
Evans C.
Posts: 5


« on: October 22, 2010, 04:07:32 pm »

Hi There,

We are opening a window, then opening another window to display a progress bar. When the progress bar finishes and returns to the previous window, we then display an image(along with other form items). 
 - The other form items show up on the page, however the image will not show.
 - A placeholder shows(with a scrollbar) where the image should be. 
 - The debug window shows that the image is indeed pointing to the correct location.

If I move the image display code above the progress bar display, the image shows up fine - so it would seem that the opening/closing of the progress bar window is the cause, however, this code works fine in Genero 2.11 AND the other items show up on the form, no problem.

I've attached a test program.

Any help would be appreciated.

Thanks,

Chris

* image_test.tar (10 KB - downloaded 875 times.)
.
Four Js
Posts: 115


« Reply #1 on: October 22, 2010, 05:07:59 pm »

Evans,

Add , SIZEPOLICY=FIXED to your image definition.

Looking at the log, I can see that the image name is sent in a third shot:

Quote
Fri 22. Oct 16:55:53 2010:5 : om 0  { {an 0 UserInterface 0 { {
...
Fri 22. Oct 16:55:55 2010:5 : om 1
..
Fri 22. Oct 16:55:55 2010:5 : om 2  {  ...  {un 95 { {numAlign "0"} {value "logo.png"}}} { ...

So the image arrives after the first window has already been displayed.
As SIZEPOLICY is not defined for your image, it is "initial" by default, which means the image size will be fixed regarding the content on first display, which is an empty image.
Then when the picture arrives, the image size is already fixed, and is not updated (because sizepolicy = initial).

Note that the issue occurs because initially the image field has no value, we've an internal mechanism to postpone fixing the size if we know there is an image that is supposed to come (because there is a value) after the first display, even if sizepolicy=initial.

What changed with 2.20:
1. the communication is in its own thread, so the GUI can be built immediately after the first part. In 2.11 it may happen that the GUI had to wait until the complete runtime group of messages. Which means that the "first display" was done lately, when the image file was already set as a value.

2. because of several bugs related to images, we had to review how image attributes are working together. The review ended up with the width / height attribute could only be supported with SIZEPOLICY=FIXED:

width and height mean that the image should have a given size, but sizepolicy=dynamic/initial means that the image should have the size of the picture. So who wins ? sizepolicy or width/height ?

So now with 2.2+ width / height attributes are only taken into account if SIZEPOLICY is set to FIXED, i.e. that it is explicitly defined that the size is not driven by the content.
Evans C.
Posts: 5


« Reply #2 on: October 22, 2010, 10:04:25 pm »

Thanks for the quick reply and the explanation - everything works great now!

Thanks again,

Chris
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines