convertToJSFile

Questions, tips and tricks and techniques for scripting in Servoy

convertToJSFile

Postby rogel » Wed Dec 07, 2011 9:49 am

when i ran in developer it works fine. deployed the solution and access via smart client it resulted in
Code: Select all
java.io.ioexception: Access is denied.

what is the default directory where this file will be created?

Code: Select all
function initializeDataLogFile() {
   var f = plugins.file.convertToJSFile("log.txt");
   if (f.exists())
      f.deleteFile();

   f.createNewFile();
}


thanks!
rogel
 
Posts: 264
Joined: Mon Jul 04, 2011 9:09 am

Re: convertToJSFile

Postby ptalbot » Wed Dec 07, 2011 3:55 pm

It really depends how you launch the client... Is it in Developer? Or in a real client?
Easiest is to use f.getAbsolutePath() to find out.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
http://www.servoy-stuff.net
https://www.servoyforge.net
--------------------------------------------
Servoy 5.2.16 / 6.0.9 / 6.1.6 / 7.3.1
All OSes / Java 5 & 6 & 7
User avatar
ptalbot
 
Posts: 1616
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: convertToJSFile

Postby jcompagner » Wed Dec 07, 2011 6:35 pm

most likely that is the dir where javaw.exe is in so windows/system or something..
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