Questions, tips and tricks and techniques for scripting in Servoy


Postby kurtbleicken » Tue Dec 27, 2011 3:27 pm

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
Kurt Bleicken
Servoy 7
Executive Director, onRamp for nonprofits
Founder, AgentSphere, LLC
Posts: 100
Joined: Mon Feb 12, 2007 11:36 pm

Re: myCallbackMethod$

Postby jcompagner » Mon Jan 02, 2012 6:01 pm

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.
Johan Compagner
User avatar
Posts: 8783
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Return to Methods

Who is online

Users browsing this forum: No registered users and 6 guests