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
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1659
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: 8884
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 3 guests