Hi:
I started to play with SOM… unsuccessfully
I want to show images in a Dialog Window, but their size are different, so I’m going to create (via SOM) a form and put this form in a dialog with the size of the image. First, I get the image size:
plugins.http.createHttpClient('HTTPCLIENT');
var imgFile = plugins.http.getMediaData(url_to_image, 'HTTPCLIENT');
var img = plugins.images.getImage(imgFile);
Then, I create the form (without navigator):
var f = solutionModel.newForm('det_img', controller.getServerName(), controller.getTableName(), my_style', false, img.getWidth(), img.getHeight());
f.navigator = SM_DEFAULTS.NONE;
Now, I create a field where to put the image:
f.newImageMedia(img, 0, 0, img.getWidth(), img.getHeight());
And finally I show the form in a dialog:
application.showFormInDialog('det_img', -1, -1, img.getWidth(), img.getHeight(, 'Detalle Imagen', false, false);
But the image doesn’t show… What’s wrong??
Thanks