PDA

View Full Version : [4.1 Beta1] Many examples broken?



BulletzBill
2 Jan 2012, 9:00 AM
Started to test 4.1 beta 1 in my application and many areas were generating javascript errors. I then started browsing the 4.1 examples and noticed many examples do not work at all and are generating similar javascript errors, the most common one being:

"Uncaught TypeError: Cannot read property 'style' of undefined"

Which, in the cases I saw, was caused by Ext.util.CSS.getRule returning undefined. A specific example that doesn't render/work at all is examples/form/dynamic.html. Verified this in Chrome 16 and Firefox 9.0.1 on OS X Lion.

Probably unrelated, but I also noticed that the CSS files in the 4.1 beta release are not minified/compressed at all and are about double the filesize.. is that just because this is a beta release, or will they remain like that in 4.1 Final?

BulletzBill
2 Jan 2012, 9:11 AM
Also forgot to note, but in my application I use the Ext.scopeResetCSS = true with the scoped css file. As a test I switched to the normal ext-all.css and left scopeResetCSS as false, and after doing this all the issues/errors my application had were no longer present. So I'm guessing the root of the issue may be that internal CSS utilities may not be correctly taking into account scoped CSS configurations?

What's odd though is that the official example I mentioned in my initial post that was not working, was not modified at all by me, I ran it as is, and it is using the standard CSS file with no scoping.

mitchellsimoens
2 Jan 2012, 9:53 AM
I'm assuming you aren't running them from a web server? Works for me on a web server but if using it off the file:// protocol it's a no go.

About the minification of the CSS... we didn't compile the CSS for beta by mistake. This will be done for the GA release.

BulletzBill
2 Jan 2012, 10:12 AM
I'm assuming you aren't running them from a web server? Works for me on a web server but if using it off the file:// protocol it's a no go.

About the minification of the CSS... we didn't compile the CSS for beta by mistake. This will be done for the GA release.
Ok, yeah I was running the examples locally via file://, so I assume thats what the issue was there.

However, I am testing my application on a web server, and am still encountering the issues caused by Ext.util.CSS.getRule() returning undefined only when Ext is configured to use the scoped reset CSS setup. So I guess my question first should be, is there any known/open issues related to using scoped reset CSS in 4.1?

In any case I will attempt to create a live test case separate from my application to reproduce the issues, and will report back here with anything I find.

BulletzBill
2 Jan 2012, 12:22 PM
Ok, I was able to replicate the issue in an official example, while running it from a web server.

Here is the example, unmodified and working ok:
http://qs1724.pair.com/users/autod1nx/EMPLOYEE/BDAMI/ext/ext4-1-beta1/examples/form/dynamic.html

And here is the same example, substituting ext-all.css for ext-all-scoped.css and Adding Ext.scopeResetCSS = true:
http://qs1724.pair.com/users/autod1nx/EMPLOYEE/BDAMI/ext/ext4-1-beta1/examples/form/dynamic_scoped.html

In the second case you will see that the components do not render and a fatal Javascript error is generated.

basememara
3 Jan 2012, 5:51 AM
There is an ongoing thread in the 4.1 Beta forums about this:
http://www.sencha.com/forum/showthread.php?167799-So-many-examples-failed-in-Chrome!!!

I am experiencing this problem using 4.1 Beta in my existing projects that work on 4.0.7.

(btw, I am using http:// for everything, not file:// protocol)

BulletzBill
3 Jan 2012, 6:02 AM
There is an ongoing thread in the 4.1 Beta forums about this:
http://www.sencha.com/forum/showthread.php?167799-So-many-examples-failed-in-Chrome!!!

I am experiencing this problem using 4.1 Beta in my existing projects that work on 4.0.7.

(btw, I am using http:// for everything, not file:// protocol)
D'oh, didn't even realize there was a 4.1 beta forum now. If possible, could a mod move this thread there?