-
8 Oct 2012 9:49 PM #1
[2.0.1.1] Config items not accessible after Sencha cmd build
[2.0.1.1] Config items not accessible after Sencha cmd build
If I have an item like this...
I can access the custom properties later like 'start' and 'end' by doing...Code:var panel = Ext.create('Ext.Component', { html: labelHtml, itemId: this.getPanelIdForDate(week['start']), start: week['start'], end: week['end'] });
However after building with Sencha SDK 2.0.0b3 these references fail. I then have to access them like...Code:someThing.start; someThing.end;
I also can't get them by doing:Code:someThing.config.start; someThing.config.end;
Bug in the SDK compiler tools, 2.0.1.1 framework, or something else?Code:someThing.getStart(); someThing.getEnd();
-
9 Oct 2012 7:22 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,581
- Vote Rating
- 433
Have you tried looking at the initialConfig? May want to create your own component and have the configs in there so you can use the getters and setters.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
9 Oct 2012 7:32 AM #3
Ok cool...will do. I thought I could pretty much jam anything in there and it would work. Seemed to in development at least

-
29 Oct 2012 1:12 PM #4
Sorry for the delay in this...just getting back to investigating it now.
So what you're saying is if I did an Ext.define instead of Ext.create, with the configs set, that it would magically work?
I'm a bit confused.
Why does it work in dev, but when built with sencha cmd it fails?
-
28 Nov 2012 3:23 PM #5
I have the exact same issue. Take a simple button for instance. In dev this works fine:
After running sencha app build the event fires, but b.action is undefined.Code:var myButton = Ext.create('Ext.Button', { width : '50%', margin : '5 5 5 0', text : 'Hello', action : 'helloworld', listeners : { tap : me.onButtonTap } }); ... onButtonTap : function(b, e, eOpts) { switch (b.action) { ... } }
If I add the following line after my button declaration it works.
I was under the impression if you had some non-static code in your configs they would not work, but a static bit of text should be fine, right?Code:myButton.action = 'helloworld';
I'm now having to go through many, many lines of code, pulling settings from the config and adding them after the button is created.
PS Using sencha cmd version 3.0.0.250Last edited by axios; 28 Nov 2012 at 3:30 PM. Reason: Added sencha cmd version
-
28 Nov 2012 5:21 PM #6
This really seems like a bug in the build process to me. Please fix...
Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.


Reply With Quote