View Full Version : Ext JS quirks when used with Aptana
edwrenbeck
29 Aug 2007, 1:32 PM
I am brand new to Ext JS and just getting started. After reading your blog I decided to check out Ext JS in Aptana. Aptana has identified several problems with your javascript. The bundled version with the IDE is 1.0.1.
This first bug is in the file ext-yui-adapter.js. The code is compressed but it looks like its in the 'combine' function with the declaration "var as=arguments". The word 'as' is reserved in Javascript.
evant
29 Aug 2007, 1:34 PM
'as' is only a keyword in "Javascript 2.0," which is a proposed new version. This isn't a bug.
jsakalos
29 Aug 2007, 1:37 PM
http://extjs.com/forum/showthread.php?t=8887
edwrenbeck
29 Aug 2007, 1:40 PM
However, it would make Ext JS more friendly to Aptana to change the variable name, which looks to be pretty local.
Thanks for the quick response!
jsakalos
29 Aug 2007, 1:55 PM
I understand your good intentions to make Ext better. Nevertheless, is this a bug?
If yes, then post it per above link, if not let me know and I'll move this thread to General Discussion or Prerelease Builds forums.
edwrenbeck
29 Aug 2007, 2:09 PM
In addition, if you are able to update the title maybe it can be made to reference Aptana in general. I have a couple of other minor changes I've noticed that would make it more friendly with an IDE like Aptana.
I've noticed a couple of places where shortcuts were used which result in errors being reported by the IDE. I would imagine those shortcuts are optimizations that are really not necessary.
For example, in DomHelper.js in version 1.0.1, line 248 is
247: var rs;
248: if(rs = insertIntoTable(tag, where, el, html)){
249: return rs;
250: }
Something like the following is more parsable by the IDE:
var rs = insertIntoTable(tag, where, el, html);
if(rs != null){
return rs;
}
Thanks, Ed.
jsakalos
29 Aug 2007, 2:22 PM
You can change name of the thread yourself by editing the first post (go to advanced mode), however, you cannot move the thread.
Do you want me to move it?
edwrenbeck
29 Aug 2007, 4:08 PM
Maybe if there is enough concurrence on some of these issues a future enhancement request can be put together
mystix
29 Aug 2007, 6:53 PM
[ moved to General from Bugs ]
this isn't a bug in Ext. moving this to the General discussions forum.
p.s. you should bring this up in the Aptana bug thread.
i believe the Spket standalone / plugin for Eclipse is able to handle Ext conventions correctly.
Eric Suen
29 Aug 2007, 11:35 PM
Hmm, aptana also mark
var i = .6; as error, maybe should make JavaScript Spec. more friendly to Aptana...
mystix
30 Aug 2007, 12:05 AM
@eric: :-? spket (plugin?) also throws the same error? sorry bout that. my bad.
hmmm... going by how the JBuilder ide handles this line of java code correctly
double i = .6;
and since various browsers' js interpreters understand that shorthand,
i'd say Aptana / any IDE for the matter should handle .6 as a valid js decimal number, imho.
that's just my opinion though.
Eric Suen
30 Aug 2007, 12:29 AM
>> spket (plugin?) also throws the same error?
Are you sure? maybe because you install more than one JavaScript plugins, some plugins using permanently error, that means even if you close that editor, the error still exists, so, that error must reported by Aptana, to make sure, first, open it in Aptana(or other plugin report this error), delete that '.'(make it right), save it, then reopen using Spket, then add '.' ...
This is the feature/problem of Eclipse as a platform...
mystix
30 Aug 2007, 4:21 AM
>> spket (plugin?) also throws the same error?
Are you sure? maybe because you install more than one JavaScript plugins, some plugins using permanently error, that means even if you close that editor, the error still exists, so, that error must reported by Aptana, to make sure, first, open it in Aptana(or other plugin report this error), delete that '.'(make it right), save it, then reopen using Spket, then add '.' ...
This is the feature/problem of Eclipse as a platform...
sorry for the mixup. let me try to clarify...
i'm actually asking if eclipse + spket plugin, or the spket standalone package, currently throws the same error as aptana?
i.e. does the latest version of spket plugin / standalone correctly interpret the following js code??
var i = .6;
Eric Suen
30 Aug 2007, 5:28 AM
".6" is valid in Spket IDE
mystix
30 Aug 2007, 8:15 AM
".6" is valid in Spket IDE
awesome. i made the right recommendation then :D
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.