Hybrid View
-
23 Jul 2012 9:10 AM #1
#setTitle( undefined )
#setTitle( undefined )
Ext version tested:
- Sencha Touch 2.1
- Chrome 20.0.1132.57
- Ext.Toolbar - #setTitle( undefined ) causes a render error.
- new Ext.Toolbar().setTitle( undefined )
- I should think that it would simply clear the title
- Uncaught TypeError: Cannot read property 'firstChild' of undefined
- sencha-touch-all-debug.js:11842
see reproduce
HELPFUL INFORMATION
Operating System:- Mac OS X 10.6.8
-
23 Jul 2012 10:46 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
Can I get a test case? Tested against 2.1.0 b1, 2.0.2 and 2.0.1.1 with both these test cases and do not get an error:
Code:new Ext.Toolbar().setTitle(undefined);
Code:var cnt = new Ext.Container({ fullscreen : true, items : [ { xtype : 'toolbar', docked : 'top' } ] }); var toolbar = cnt.down('toolbar'); toolbar.setTitle(undefined);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.
-
23 Jul 2012 12:27 PM #3
Thanks for the response.
Hmm I didn't try a unit test. It doesn't throw an error this way (not sure what I screwed up in my code); however, setting the title after passing undefined doesn't seem to work.
Code:var cnt = new Ext.Container({ fullscreen : true, items : [ { xtype : 'toolbar', docked : 'top' } ]});var toolbar = cnt.down('toolbar');toolbar.setTitle(undefined);toolbar.setTitle('some title');
-
23 Jul 2012 12:28 PM #4
Ugh that didn't format very well.
Code:var cnt = new Ext.Container({ fullscreen : true, items : [ { xtype : 'toolbar', docked : 'top' } ] }); var toolbar = cnt.down('toolbar'); toolbar.setTitle(undefined); toolbar.setTitle( 'some title' );
-
23 Jul 2012 12:29 PM #5Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
This is working for me:
Code:var cnt = new Ext.Container({ fullscreen : true, items : [ { xtype : 'toolbar', docked : 'top' } ] }); var toolbar = cnt.down('toolbar'); toolbar.setTitle(undefined); toolbar.setTitle('Test');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.
-
23 Jul 2012 12:52 PM #6
Not really sure. I put a workaround in for now anyway.
Here's the exact build I'm using:
(debug version)
Build date: 2012-06-04 15:34:28 (d81f71da2d56f5f71419dc892fbc85685098c6b7)
-
15 Nov 2012 9:21 AM #7
Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.


Reply With Quote