Page 1 of 1

Launching a defined app

PostPosted: Fri May 28, 2010 10:44 am
by Vaj
Hi,
I have a photo module which requires images to be loaded off a blob edited and loaded back to the db.
So to do this I need to launch a specified editor to open the image in. If I used the protocol handler it will only launch the image preview app not the editor,
so I have to specify a default editor app in both macs and windows. I have tried several times without success. So I was wondering if any of you have dealt with launching a specified and open a file in the launched app. So for example launch paint and open c:\photo.jpg without any user intervention.

I have tried to do application.executeProgram('C:\\Windows\\System32\\mspaint.exe',out_file.getAbsolutePath()) without success

Thanks in advance,

Re: Launching a defined app

PostPosted: Fri May 28, 2010 11:04 am
by mboegem
Vaj wrote:I have a photo module which requires images to be loaded off a blob edited and loaded back to the db.
So for example launch paint and open c:\photo.jpg without any user intervention.


If I understand you correctly you have images stored in the db.
Then you want to edit them in an external app (external in terms of: outside Servoy)
and load them back in the database.

So: once you have the image stored on a local disk and opened in an editor and saved it again (assuming that this can be done with one push of a button), how do you get the image back into your db?

Re: Launching a defined app

PostPosted: Fri May 28, 2010 11:45 am
by Vaj
Vaj wrote:So: once you have the image stored on a local disk and opened in an editor and saved it again (assuming that this can be done with one push of a button), how do you get the image back into your db?


Same way I got in there the first place. So user clicks edit, takes the user to a form which says 'this image is being edited' with a button 'Finish Editing' The external app pops up, the user makes changes, and saves the changes via the app. (obviously the changes will be saved in the same location cos the file was originally loaded by the editor from the temp location) Then when the user goes back in to servoy he clicks the button 'Finish Editing' and this ovverides the image that already exists in the blob with the modified one, since it knows the temp location where it was first saved to. Modified image is shown on the same form. A question dialog pops up do you want to accept changes. if Yes commit Transaction if No Roll Back. :D