PDA

View Full Version : The create method in controller fix problem



bryan@erry.com
15 Oct 2015, 3:35 AM
In the webinar video, I saw that the created method will have signatures derived through api with comments. That is a very nice feature.
But in my IDE?when I followed the video instruction and click create method in controller fix, the generated method doesn't have any parameter and certainly no comment either.
In my grid pannel:

listeners: {
itemdblclick: 'editUser'
},When I clicked the fix it generates:

editUser: function () {

}This is no good. Is this a bug cause I already have the latest version of the plugin.

Mark.Brocato
15 Oct 2015, 4:28 PM
I noticed this as well last week. It is already fixed in development and will be released soon.

Mark.Brocato
15 Oct 2015, 5:39 PM
The fix for this just went out. Please upgrade to v6.0.4 and let me know if it works for you.

bryan@erry.com
16 Oct 2015, 1:24 AM
The fix for this just went out. Please upgrade to v6.0.4 and let me know if it works for you.

No, still doesn't work. The problem remains the same.

Mark.Brocato
16 Oct 2015, 12:40 PM
Hmm... can you share some more info?

What version of Ext JS are you using?
Is this a universal app?
Where are the view and controller classes located in the source tree?
Can you paste in more of the view class so I can get a better idea of context?

bryan@erry.com
18 Oct 2015, 10:38 PM
I am using extjs 6 in Idea 14.1.5 with sencha plugin 6.0.4.438.

53443
It is a classic toolkit application.
I am following the video in :
https://www.sencha.com/webinars/improving-developer-productivity-sencha-jetbrains-plugins/

bryan@erry.com
18 Oct 2015, 10:54 PM
This is where I create a event listener
53444
And after I click the quick fix?
53445
This method signature is created for me in the controller file.

Mark.Brocato
19 Oct 2015, 5:44 AM
What Ext JS class does your view extend? It looks like you're trying to listen for Ext.grid.Panel's itemclick event. If you're not actually extending Ext.grid.Panel, or another class that defines an itemclick event, the plugin won't be able to determine the arguments and will create a no-arg controller method.

bryan@erry.com
19 Oct 2015, 5:18 PM
/**
* Created by Bryan on 15/10/15.
*/
Ext.define('Webcast.view.userslist.UsersList', {
extend: 'Ext.grid.Panel',

requires: [
'Webcast.view.userslist.UsersListModel',
'Webcast.view.userslist.UsersListController'
],


xtype: 'userslist',

title: 'Users',

viewModel: {
type: 'userslist'
},

controller: 'userslist',

bind:{
store: '{users}'
},

listeners: {
itemclick: 'editUser'
},

columns: [{
dataIndex: 'name',
flex: 1,
text: 'Name'
}, {
text: 'Age',
flex: 1,
dataIndex: 'age'
}, {
text: 'Gender',
flex: 1,
dataIndex: 'gender'
}, {
text: 'Email',
flex: 1,
dataIndex: 'email'
}]
});I think I extended it from gridpanel correctly.

bryan@erry.com
28 Oct 2015, 7:12 AM
Do you have any update on this issue?

Mark.Brocato
28 Oct 2015, 7:20 AM
Sorry about that. We're a bit stumped. No one here has been able to replicate this. Maybe the problem is something we're not seeing? Can you paste you app.json for me? Can you verify that the itemclick method comes up as a suggestion with the Sencha icon when you type ctrl-click in the listeners object? That will let us know if it's actually finding the event in Ext.grid.Panel correctly. Also, if you cmd-click (ctrl-click on windows) on Ext.grid.Panel in the extend property, does it take you to the grid source in the SDK?

Mark.Brocato
4 Nov 2015, 8:04 AM
I've finally figured out the cause. You're not doing anything wrong. it looks like there is a bug in the plugin that only affects some events Ext 6.0.1. The itemclick event happens to be one of the those. I'm putting in a fix for this today. It should be out fairly soon.

bryan@erry.com
7 Nov 2015, 11:40 PM
Good to hear that, looking forward for your update. Nice job.

Mark.Brocato
13 Nov 2015, 5:39 AM
We just released an update this morning which should solve this issue for Ext JS 6.0.1.