[Extjs] Code completion inactive for Ext.DomHelper

Get help with Spket IDE.
Post Reply
jad
Posts: 7
Joined: Wed Mar 09, 2011 12:43 pm

[Extjs] Code completion inactive for Ext.DomHelper

Post by jad » Wed Mar 09, 2011 1:13 pm

Hi!

First congratulations for this amazing product. I've been using Spket with ExtJs for some time now, it's been working great !

I have a problem when it comes to code completion for Ext.DomHelper. For some reason Spket doesn't seem to pick up the singleton that it is. As I understand they spread the class in two files, DomHelper.js and DomHelper-more.js. DomHelper.js returns a classical "Static class" and DomHelper-more does an Ext.apply to add some more methods to the object. My theory is that Ext.apply confuses the parser in some way.

- I can get completion in DomHelper.js which contains the Ext.DomHelper = function(){}; declaration
- I cannot get completion in DomHelper-more.js which contains the Ext.apply(Ext.DomHelper,function(){}()); declaration
- I cannot get completion at all on this object in any other file.

I was wondering if someone ran into this problem and if there was a way to get DomHelper parsed. I tried to use the jar that Eric provided to correct a problem with parsing "modules". It corrects the problem indeed, but it did not change anything about DomHelper. Anyway I don't know if this is a bug or a misconfiguration on my part.

Thanks in advance for your help !
Jad

eric_suen
Site Admin
Posts: 678
Joined: Wed Sep 28, 2005 7:00 am
Contact:

Re: [Extjs] Code completion inactive for Ext.DomHelper

Post by eric_suen » Wed Mar 09, 2011 6:12 pm

It's not a misconfiguration, that the issue of the code assist engine, you can change some code in DomHelper.js and DomHelper-more.js to solve this problem, very simple, change following code

Code: Select all

pub = {
...
}
to

Code: Select all

return {
...
}

jad
Posts: 7
Joined: Wed Mar 09, 2011 12:43 pm

Re: [Extjs] Code completion inactive for Ext.DomHelper

Post by jad » Thu Mar 10, 2011 9:17 am

It does work ! Thanks :)

Still it means one has to modify the ext source code, and be careful about not using it for anything else than completion since pub is supposed to live in the DomHelper for the doInsert private method. Again, the base DomHelper.js file seems to be correctly analyzed by the code assist engine, but it's what's happining in the "-more" file that confuses everything.

Anyway thanks for the quick solution! I'll be glad to help if you want to look into why the DomHelper-more.js destroys completion.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests