-
17 Mar 2012 6:38 PM #1
Ext.isReady needs to be triggered by Ext.onReady
Ext.isReady needs to be triggered by Ext.onReady
REQUIRED INFORMATION
Ext version tested:- Sencha Touch 2.0.0
Browser versions tested against:- Chrome 11
DOCTYPE tested against:- HTML 4
Description:- Ext.isReady will not be set to true when nothing is listening for Ext.onReady()
Steps to reproduce the problem:- Open a page with just Sencha Touch
- Wait a second, then execute:
console.info('expecting to be loaded:'+Ext.isReady);
Ext.onReady(Ext.emptyFn);
console.info('expecting to be loaded:'+Ext.isReady);
The result that was expected:- Ext.isReady is true when the dom is ready
The result that occurs instead:- Ext.isReady needs to be triggered by Ext.onReady()
Test Case:
see above
Best regards
RolandRoland Schütz
Senior Software Architect
---
Bancha Project - Seamless integrate CakePHP with ExtJS and Sencha Touch
-
19 Mar 2012 7:01 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
Ext.onReady is for Ext JS not Sencha Touch. You should this to be more ST:
However that won't change Ext.isReady. The reason being is Ext.Loader could still be loading and once it makes sure all classes are loaded then it will fire that onReady method so you are not guaranteed that Ext.setup#onReady will fire when that code is executed by the browser. The onReady method will fire when all the classes are made sure is loaded.Code:Ext.setup({ onReady : Ext.emptyFn });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.
-
19 Mar 2012 9:40 AM #3
Hello!
Then the API Docs need to be fixed. http://docs.sencha.com/touch/2-0/#!/...method-onReady
They claim: "Adds a listener to be notified when the document is ready (before onload and before images are loaded). "
Is there a different on document ready listener?
best regards
RolandRoland Schütz
Senior Software Architect
---
Bancha Project - Seamless integrate CakePHP with ExtJS and Sencha Touch
-
19 Mar 2012 9:51 AM #4Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,653
- Vote Rating
- 14
-
9 Apr 2012 2:39 PM #5Sencha - Sencha Touch Dev Team
- Join Date
- Jul 2009
- Location
- Palo Alto, California
- Posts
- 469
- Vote Rating
- 9
Docs have been updated for 2.0.1, and Ext.isReady has been marked as private. Ext.onReady should always be used, Ext.isReady should not be relied upon.
Sencha Touch Lead Architect
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-2522
in
2.0.


Reply With Quote