-
27 Jun 2012 6:04 AM #1
[4.1] 'Ext.app.Controller.addRef - modify to accept arrays
[4.1] 'Ext.app.Controller.addRef - modify to accept arrays
The public (but undocumented) Ext.app.Controller.addRef method currently accepts a single reference object, but it could also accept an array of such references by not converting the ref param to an array. There's no need to convert the param to an array since the ref method will do this conversion by calling Ext.Array.from(refs).
EDITCode:Ext.define('Ext.app.Controller', { .... ref: function(refs) { refs = Ext.Array.from(refs); ... }, addRef: function(ref) { return this.ref([ref]); // <-- skip [] around ref and rename ref to refs }, ....
Also, the addRef method should not return this.ref since the ref method doesn't return a value, so just skip return. Basically, addRef would be an alias for the ref methodLast edited by LesJ; 27 Jun 2012 at 10:59 AM. Reason: Don't return a value from addRef
-
27 Jun 2012 7:26 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
Thanks for the report.
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.
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-6672
in
4.2.0 Sprint 3.


Reply With Quote