Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » How to work with javascript?
How to work with javascript? [message #91703] Sat, 24 January 2009 01:04 Go to next message
matthew is currently offline matthewFriend
Messages: 14
Registered: July 2009
Junior Member
Hi, I am using PDT for Drupal development. I can edit, debug.
However, I have two problems:

1. Javascript show a lot of warnings and errors. For example,
"function $ is undefined". "$" from jQuery and the jQuery library is
inside the project. How can I make PDT understand javascript?

2. In debugging, very consistently after the first two times going
through the debugger, subsequenctly I always get

"Error: A Runtime Error has occured. Do you want to debug? Line: 1
Error: Syntax error"

or

"Error: A Runtime Error has occured. Do you want to debug? Line: 132
Error: 'jQuery' is undefined"

Pressing "No" would get rid of these error dialogs and allow me to
continue to debug. However, everytime I hit another breakpoint, I
would get these errors again.
Re: How to work with javascript? [message #91750 is a reply to message #91703] Sat, 24 January 2009 01:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nickboldt.gmail.com

Does your project have both PDT and Javascript natures/builders? How did
you create/import the project? What's in the .project file?

Matthew Young wrote:
> Hi, I am using PDT for Drupal development. I can edit, debug.
> However, I have two problems:
>
> 1. Javascript show a lot of warnings and errors. For example,
> "function $ is undefined". "$" from jQuery and the jQuery library is
> inside the project. How can I make PDT understand javascript?
>
> 2. In debugging, very consistently after the first two times going
> through the debugger, subsequenctly I always get
>
> "Error: A Runtime Error has occured. Do you want to debug? Line: 1
> Error: Syntax error"
>
> or
>
> "Error: A Runtime Error has occured. Do you want to debug? Line: 132
> Error: 'jQuery' is undefined"
>
> Pressing "No" would get rid of these error dialogs and allow me to
> continue to debug. However, everytime I hit another breakpoint, I
> would get these errors again.

--
Nick Boldt :: http://wiki.eclipse.org/User:Nickb
Re: How to work with javascript? [message #91808 is a reply to message #91750] Sat, 24 January 2009 05:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: catchmeow.hotmail.com

>Does your project have both PDT and Javascript natures/builders?

My Eclipse install is the All-in-one PDT download from
www.eclipse.org/pdt version 2.0.0. I don't know about Javascript
natures/builders. Is this something I need to install? I installed
the JSEclipse plugin from Adobe.

>How did
>you create/import the project? What's in the .project file?

I did a New PHP Project and point the project directory to the Drupal
install directory. I've try both enable/disable Javascript support.
In both case, debug give me this "Runtime Error...Syntax Error"
problem with javascript.

PDT is working for the most part for me. There is even a litle bit of
code completion: just a list of variables in the context. No
properties/methods like Java though. Can PDT do more fancy code
completion?
Re: How to work with javascript? [message #91865 is a reply to message #91808] Sat, 24 January 2009 11:59 Go to previous messageGo to next message
sNop is currently offline sNopFriend
Messages: 281
Registered: July 2009
Senior Member
Hi Tina napsal(a):
>> Does your project have both PDT and Javascript natures/builders?
>
> My Eclipse install is the All-in-one PDT download from
> www.eclipse.org/pdt version 2.0.0. I don't know about Javascript
> natures/builders. Is this something I need to install? I installed
> the JSEclipse plugin from Adobe.
>

I recommend you to try Aptana, JSEclipse have last update in Dec 15th, 2006, but Aptana is
intensively developed
Re: How to work with javascript? [message #91879 is a reply to message #91865] Sat, 24 January 2009 20:33 Go to previous message
matthew is currently offline matthewFriend
Messages: 14
Registered: July 2009
Junior Member
>I recommend you to try Aptana, JSEclipse have last update in Dec 15th, 2006, but Aptana is
>intensively developed

I did not realize JSEclipse has not been update for so long. I use
Amateras
( http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?pa ge=EclipseHTMLEditor)
for my Java work. It works really well for html/css/javascript. But
its latest version I can only make it work with Eclipse 3.3.x and not
with PDT Eclipse 3.4.1. I'm going to see if Amateras will be updated
for 3.4.1 before I try Aptana.
Previous Topic:"Source => Shift Left" doesn't work
Next Topic:Runtime error in the browser output view
Goto Forum:
  


Current Time: Sat Jan 28 08:25:51 GMT 2023

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

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

Back to the top