Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dash » calling IFile.delete method, but its a javascript keyword.
calling IFile.delete method, but its a javascript keyword. [message #560378] Mon, 24 April 2006 20:39
John J. Franey is currently offline John J. FraneyFriend
Messages: 55
Registered: July 2009
Member
Hi,

I think eclipse monkey is neat. I didn't expect to ever find a need to
write a monkey script, then all of a sudden: I want to extract a
project's classpath, manipulate the strings and write them out to
another file.

I wrote the em script to write contents to a new file. I was happy that
IFile.create worked fine. However, IFile.create returned error on my
second run because the file already exists. Obviously, I need to delete
the file first. Unfortunately, the 'delete' string appears to be a key
word in javascript. (Please note that I have not written a stitch of
javascript until I wanted to develop an em script.)

Is there a workaround? Does it involve writing another DOM?



Here is part of the em error message:

file.delete(false, false, null);
missing name after . operator



Here is lines of source code:

file = theProject.getFile("filename");
file.delete(false, false, null);


Thanks and regards,
John
Previous Topic:What's ahead in Dash?
Next Topic:calling IFile.delete method, but its a javascript keyword.
Goto Forum:
  


Current Time: Thu Dec 18 13:46:03 GMT 2014

Powered by FUDForum. Page generated in 0.16288 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software