ExtJS 4.x support

Feature requests
bcmartin
Posts: 1
Joined: Tue Mar 26, 2013 10:45 am

Re: ExtJS 4.x support

Post by bcmartin » Tue Mar 26, 2013 11:19 am

I have same question like "MadOtis" about support ExtJS 4.2 which haven't jsb2 or jsb3 file.

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

Re: ExtJS 4.x support

Post by eric_suen » Wed Mar 27, 2013 10:41 am

download http://www.agpad.com/downloads/ext-4.2.0.663.jsb2 and put it under Ext root folder

andjarnic
Posts: 2
Joined: Thu Apr 04, 2013 2:41 am

Re: ExtJS 4.x support

Post by andjarnic » Thu Apr 04, 2013 2:44 am

I too am having the issue of the previous posters. I tried that .jsb2 file, and it doesn't work for me. I am using Eclipse IDE 4.2 and Spket 1.6.23. I put the file in the base ext folder, where it has src/ packages/ resources/ etc. When I add it to the spket configuration, only the Base class shows up in the list of checkboxes. I don't see anything else. I do see in the src/ folder all the .js files, including folders (namespaces). I've restarted my Eclipse as well but still no code completion.

Any ideas?

Thank you.

andjarnic
Posts: 2
Joined: Thu Apr 04, 2013 2:41 am

Re: ExtJS 4.x support

Post by andjarnic » Thu Apr 04, 2013 2:48 am

I take it back.. it now works.

First thing was.. after adding the jsb2 file, I had to set ext to DEFAULT. I saw that instruction before, but forgot to click that.

Second thing is.. I originally had my app.js file open with Spket editor. Even after setting to default, it didn't work. I closed the file and opened again in Spket editor, and now it works.

I hope this helps others.

ken4ward
Posts: 6
Joined: Thu May 23, 2013 1:10 pm

Re: ExtJS 4.x support

Post by ken4ward » Fri May 31, 2013 4:16 pm

Please I have been trying to install Spket plugin in Eclipse from this link http://www.agpad.com/update, but it always fail. Is there step-by-step way to go about this? Thanks.

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

Re: ExtJS 4.x support

Post by eric_suen » Sun Jun 02, 2013 3:48 am

Have you tried this - viewtopic.php?f=3&t=3678

crp_spaeth
Posts: 23
Joined: Sat Jul 25, 2009 6:28 pm

Re: ExtJS 4.x support

Post by crp_spaeth » Tue Jun 11, 2013 10:26 am

Hey Eric,

really nice to see you still working hard on the plugin!

I am currently evaluating your plugin and its code completion with sencha Touch 2.2.1.

After seeing a lot of properties and function commets already working fine: I run into an Issue while working with autogenerated getters and setters.

In Ext 4 and Touch2 the frameworks classsystem automatically generates a few Functions for you.

So when you add a config property 'name' to a new class like this:

Code: Select all

Ext.define('Animal', {
    config: {
        name: null
    },

    constructor: function(config) {
        this.initConfig(config);
    },

    speak: function() {
        alert('grunt');
    }
});
Ext will provide getter and setter for you and you can do stuff like:

Code: Select all

var bob = Ext.create('Animal', {
    name: 'Bob'
});

alert(bob.getName()); //alerts 'grunt'
This is a really nice feature and i find my self using it heavily.

Could you provide those additional functions in your code completion as well?

for more details see:

http://docs.sencha.com/touch/2.2.1/#!/g ... ass_system


Regards and thanks for your great work
Martin

crp_spaeth
Posts: 23
Joined: Sat Jul 25, 2009 6:28 pm

Re: ExtJS 4.x support

Post by crp_spaeth » Tue Jun 11, 2013 10:36 am

Another great thing would be the automatic resolving of the dependencies.

To get a class documentation of your own classes in the current editor you need to add the class manually by adding a comment
// @require in SPKET.

You could resolve those dependencies by reading out the requires array of the class!
Currently we have to add the dependencies two times.

in the beginning of the file by adding your comment and by setting up the requieres array

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

Re: ExtJS 4.x support

Post by eric_suen » Thu Jun 13, 2013 3:18 pm


crp_spaeth
Posts: 23
Joined: Sat Jul 25, 2009 6:28 pm

Re: ExtJS 4.x support

Post by crp_spaeth » Mon Jun 17, 2013 9:20 pm

Hey Eric!
Great! Getters and Setters work for me! Is the idea about resolving required files automatically already included?
If so, how do i set it up?
Regards

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

Re: ExtJS 4.x support

Post by eric_suen » Tue Jun 18, 2013 4:45 am

it should work, you don't need any setup, according the document "The names of the classes map directly to the file paths in which they are stored. As a result, there must only be one class per file." For example:
MyCompany.custom.Button is stored in MyCompany/custom/Button.js

crp_spaeth
Posts: 23
Joined: Sat Jul 25, 2009 6:28 pm

Re: ExtJS 4.x support

Post by crp_spaeth » Tue Jun 18, 2013 7:08 am

Okay!
This works for the Animal Example. The Problem with Touch and Extjs is you have some setup wich tells the Loader where to look for sources.
For example if you create an application via Sencha CMD it creates an app folder in which you place all your Application logic.

In this case you end up with the path "MyCompany/app/custom/Button.js" for the class MyCompany.custom.Button

You usually set up your pathes in the app.js file placed in the base folder: MyCompany/app.js

Where you setup the Ext.Loader like this:

Ext.Loader.setPath({
'Ext': 'touch/src',
'MyCompany': 'app',
'Ext.ux': './ux'
});

By calling setPath defines how the parser can resolve the namespaces.

http://docs.sencha.com/extjs/4.2.1/#!/a ... -cfg-paths

May you can read out this information as well or have your own config.js where to define the namespace<->path mapping

crp_spaeth
Posts: 23
Joined: Sat Jul 25, 2009 6:28 pm

Re: ExtJS 4.x support

Post by crp_spaeth » Tue Jun 18, 2013 7:14 am

Since ext sources are included in every touch/ext project you may can get rid of the jsb files as well!

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

Re: ExtJS 4.x support

Post by eric_suen » Tue Jun 18, 2013 2:11 pm

It ignore all classes start with "Ext." with should use jsb and add it to your profile. for other classes in your profile, it use relative path look up, for examples, if AAA.custom.Button in app/AAA/custom/Button.js, then BBB.custom.Button should be in app/BBB/custom/Button.js

crp_spaeth
Posts: 23
Joined: Sat Jul 25, 2009 6:28 pm

Re: ExtJS 4.x support

Post by crp_spaeth » Tue Jun 18, 2013 2:24 pm

The Problem with that relative lookup is that this just doesn't fit to the sencha/ext standard Application Structure in wich you configurate your namespaces to match to pathes.

So a class that is located under app doesn't have the BBB prefix.

run "sencha generate app Animal ../animal":

you will end up with the following structure:

animal/app
animal/app/controller/Animal.js
animal/app/store/Animals.js
animal/app/model/Animal.js
animal/app/View/AnimalBase.js
animal/app/View/AnimalGrid.js
animal/app/app.js

The Animal Class defined in animal/app/controller/Animal.js has the Full name: animal.controller.Animal.
Now you you cant use require: 'animal.view.AnimalGrid' to include animal/app/View/AnimalGrid.js nor can you use extend AnimalBase in AnimalGrid.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests