Getting the filename

Questions, tips and tricks and techniques for scripting in Servoy

Getting the filename

Postby kschuster » Wed Feb 01, 2012 7:07 pm

Just getting started...

I'm building a function to show the file open dialog then I want to parse the path and filename into their own variables.

Running latest version 6.0.5

var thisfile = plugins.file.showFileOpenDialog(1,null,false);
importTarget = thisfile
fileName = importTarget.getName();

getName() here is highlighted with this remark - The function getName() is undefined in this script

getName is under file/JSFile - how do I use this??

Thanks in advance
kschuster
 
Posts: 53
Joined: Fri Mar 28, 2008 4:42 am
Location: Houston, TX

Re: Getting the filename

Postby jcompagner » Mon Feb 13, 2012 6:43 pm

what is importtarget?
why do you have that why don't you do thisfile.getName()
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8284
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 1 guest