Page 1 of 1

myCallbackMethod$

PostPosted: Tue Dec 27, 2011 3:27 pm
by kurtbleicken
plugins.file.showFileOpenDialog(1) worked just fine in Smart Client, but when I tried to get Web Client working I got an error message to use a JSFile array. In the example they use myCallbackMethod. What is this? I just want to find a file and attach it to an email.

var fileName = plugins.file.showFileOpenDialog(1)
//2011_12_26 below is what I need here. kb
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), other options can be set but are not used in the webclient (yet)
//var file = plugins.file.showFileOpenDialog(myCallbackMethod)

Thanks. K

Re: myCallbackMethod$

PostPosted: Mon Jan 02, 2012 6:01 pm
by jcompagner
showFileOpenDialog for the web must be used with a callbackmethod
A callback method is just a reference (without the ()) to another method that you have in the current js file (or a global method)
that one is then call when a user has uploaded the files in the browser to the server.