Code assist not working for Dojo libraries

Discussion for Aptana Studio newbies about how to get Studio up and running.

Moderator: Aptana Staff

Code assist not working for Dojo libraries

Postby juzzam » Sun Apr 12, 2009 4:51 pm

It seems as though Aptana does not resolve dojo.require() package delcarations becuase I get no code assist for dojo libraries. For example, I put the following into a single .js file:

dojo.require("dijit.form.Button");

var button = new dijit.form.Button();

Aptana does recognize the base dojo library and provides code assist that helped me find dojo.require(). However, it does not realize that I have imported the dijit library. When I try to ctrl+click the dijit, form, or Button text there are no links to the source. When I press ctrl+space after dijit. or form. nothing happens.

Of course when I created the web project, I added Dojo 1.2 as an Ajax library.

Help?
juzzam
 
Posts: 2
Joined: Sat Apr 11, 2009 3:08 am

Re: Code assist not working for Dojo libraries

Postby IceBox » Sun Apr 12, 2009 5:49 pm

juzzam wrote:Help?


You can drop your library in References View (File References).

Hope that helps,
IceBox
User avatar
IceBox
 
Posts: 1003
Joined: Mon Jul 07, 2008 12:03 pm
Location: Milano, Italy

Re: Code assist not working for Dojo libraries

Postby juzzam » Tue Apr 14, 2009 5:05 am

No it doesn't. Dojo uses require() to import js modules. Those modules also have require() import statements.. and so on.. so I would have to add numerous javascript files to the references view that would cause conflicts because the dojo js files expect to have the proper directory structures.
juzzam
 
Posts: 2
Joined: Sat Apr 11, 2009 3:08 am

Re: Code assist not working for Dojo libraries

Postby rickoshay » Fri May 01, 2009 11:12 pm

What I don't understand is why Aptana doesn't a) stop claiming they support DOJO code assist b) fix it. It's really laughable and happily the product was cheap enough that we simply stopped using Aptana. I'm hopeful somebody will not only write but test a good editor that is DOJO-aware. The way DOJO is structured, and the way they include modules, is so cut and dried there's just no excuse other than incompetence or apathy that it doesn't work with Aptana.
rickoshay
 
Posts: 2
Joined: Thu Aug 28, 2008 4:11 pm


Return to Getting Started with Studio