Trouble

When I run this method in 2.1.1 b1 it runs fine. In 2.1.1 final I get "undefined value has no properties’ when I get to the 3rd line. For some reason it does not recognize that form? I went back to the beta and the problem resolved.

globals.SingleImageIDRight=images_to_thumbnails.image_assets_thumbnailsid
globals.ImageRight = images_to_thumbnails.thumbnail_large
forms.images_assets_thumbnailsLeftRight.controller.loadAllRecords()
application.showFormInDialog(forms.images_assets_thumbnailsLeftRight,-1,-1,-1,-1,‘Compare photos’,false,false);

John McCann

Servoy Developer
Version R2 2.1.1 b1-build 311
Java version 1.4.2_06-b03 (Windows XP)

can you send me a (small) example.
Because i need to see what suddenly goes wrong.

You could try this first:

application.output(forms.images_assets_thumbnailsLeftRight)

what does it output then?

rvoy Developer
Version R2 2.1.1 b1-build 311
Java version 1.4.2_06-b03 (Windows 2003)

com.servoy.j2db.FormPanel[images_assets_thumbnailsLeftRight,0,0,0x0,invalid,layout=com.servoy.j2db.util.gui.e,alignmentX=null,alignmentY=null,border=javax.swing.plaf.metal.MetalBorders$ScrollPaneBorder@f91c8f,flags=320,maximumSize=,minimumSize=,preferredSize=,columnHeader=,horizontalScrollBar=com.servoy.j2db.FormPanel$a[,0,0,0x0,invalid,layout=com.incors.plaf.kunststoff.KunststoffScrollBarUI,alignmentX=null,alignmentY=null,border=,flags=4194600,maximumSize=,minimumSize=,preferredSize=,blockIncrement=10,orientation=HORIZONTAL,unitIncrement=1],horizontalScrollBarPolicy=HORIZONTAL_SCROLLBAR_AS_NEEDED,lowerLeft=,lowerRight=,rowHeader=,upperLeft=,upperRight=,verticalScrollBar=com.servoy.j2db.FormPanel$a[,0,0,0x0,invalid,layout=com.incors.plaf.kunststoff.KunststoffScrollBarUI,alignmentX=null,alignmentY=null,border=,flags=4194600,maximumSize=,minimumSize=,preferredSize=,blockIncrement=10,orientation=VERTICAL,unitIncrement=1],verticalScrollBarPolicy=VERTICAL_SCROLLBAR_AS_NEEDED,viewport=com.servoy.j2db.util.af$b[,0,0,0x0,invalid,layout=com.servoy.j2db.util.af$a,alignmentX=null,alignmentY=null,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,isViewSizeSet=false,lastPaintPosition=,scrollUnderway=false],viewportBorder=]

Servoy Developer
Version R2 2.1.1-build 313
Java version 1.4.2_06-b03 (Windows 2003)

com.servoy.j2db.FormPanel[images_assets_thumbnailsLeftRight,0,0,0x0,invalid,layout=com.servoy.j2db.util.gui.e,alignmentX=null,alignmentY=null,border=javax.swing.plaf.metal.MetalBorders$ScrollPaneBorder@11970e2,flags=320,maximumSize=,minimumSize=,preferredSize=,columnHeader=,horizontalScrollBar=com.servoy.j2db.FormPanel$a[,0,0,0x0,invalid,layout=com.incors.plaf.kunststoff.KunststoffScrollBarUI,alignmentX=null,alignmentY=null,border=,flags=4194600,maximumSize=,minimumSize=,preferredSize=,blockIncrement=10,orientation=HORIZONTAL,unitIncrement=1],horizontalScrollBarPolicy=HORIZONTAL_SCROLLBAR_AS_NEEDED,lowerLeft=,lowerRight=,rowHeader=,upperLeft=,upperRight=,verticalScrollBar=com.servoy.j2db.FormPanel$a[,0,0,0x0,invalid,layout=com.incors.plaf.kunststoff.KunststoffScrollBarUI,alignmentX=null,alignmentY=null,border=,flags=4194600,maximumSize=,minimumSize=,preferredSize=,blockIncrement=10,orientation=VERTICAL,unitIncrement=1],verticalScrollBarPolicy=VERTICAL_SCROLLBAR_AS_NEEDED,viewport=com.servoy.j2db.util.af$b[,0,0,0x0,invalid,layout=com.servoy.j2db.util.af$a,alignmentX=null,alignmentY=null,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,isViewSizeSet=false,lastPaintPosition=,scrollUnderway=false],viewportBorder=]

ok that is what it should do.

if you dig into this deeper like this:

globals.SingleImageIDRight=images_to_thumbnails.image_assets_thumbnailsid;
globals.ImageRight = images_to_thumbnails.thumbnail_large;
application.output(forms.images_assets_thumbnailsLeftRight);
application.output(forms.images_assets_thumbnailsLeftRight.controller);
forms.images_assets_thumbnailsLeftRight.controller.loadAllRecords();
application.showFormInDialog(forms.images_assets_thumbnailsLeftRight,-1,-1,-1,-1,'Compare photos',false,false);

I think 2.1.1 is having problems with global media variables. Anyway I changed the two dataproviders on the form I was trying to display from global media variables to a not global media field and the problem went away.

John McCann

what kind of problem do you have with global media variables?
They should work as fine, if not even much better then db variables!

and you said that you debugger did hang on this line:

forms.images_assets_thumbnailsLeftRight.controller.loadAllRecords()

but what does that line have to do with the global media?

What does youre working code look like now?

Johan,

It does hang on that line if when the only elements on the form are buttons that have global media variables as dataproviders.

If I switch the dataproviders for the buttons to related columns, [tablea_to_tableb.imagemedia] the problem goes away. The problem started between build 311 and 313.

I have another post about problems with global media variables.

JDM

can i look at a (sample) solution?