PDA

View Full Version : [CLOSED][3.1] origclass.prototype is undefined



dtex-lab
21 Dec 2009, 3:37 AM
Hi

I'm using the ux-all-debug.js and I recieve this exception

This is the full stack trace



origclass.prototype is undefined
anonymous(Object name=origclass, Object)ext-base-debug.js (line 148)
anonymous()ux-all-debug.js (line 9471)
ux-all-debug.js()ux-all-debug.js (line 9469)
[Break on this error] var p = origclass.prototype;\n


I'm investigate a little bit and I found that the TreeGridColumn.js extension/example have this strange coding (at least for me and for 3.1.0):





(function() {
Ext.override(Ext.list.Column, {
init : function() {
if(!this.type){



It embeds the override into a function.. and I believe this cause the excpection because in the ext-base-debug the originclass is undefined (see error.jpg)

This is a quick test case in order to replicate it:



<html>

<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<link rel="stylesheet" type="text/css" href="lib/extjs/resources/css/ext-all.css"
/>
<link rel="stylesheet" type="text/css" href="lib/extjs/ux/css/ux-all.css"
/>
<script type="text/javascript" src="lib/extjs/adapter/ext/ext-base-debug.js">
</script>
<script type="text/javascript" src="lib/extjs/ext-all-debug.js">
</script>
<script type="text/javascript" src="lib/extjs/ux/ux-all-debug.js">
</script>
<script>
Ext.onReady(function() {
Ext.QuickTips.init();
Ext.Msg.show({
title: "ux-all-debug.js error",
msg: "TreeGridColumn.js into ux-all-debug.js create an exception",
minWidth: 200,
modal: true,
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
});
});
</script>
</head>
</body>
</html>


thanks

evant
21 Dec 2009, 3:49 AM
Can't replicate it... anyone else?

dtex-lab
21 Dec 2009, 4:57 AM
Hi Evant
You cannot replicate it using released 3.1.0 or from SVN ?
I'm using the ux-all-debug.js file distributed in the examples\ux folder

tested with FF 3.5.6
You should get a look to the FF firebug console.

ty

evant
21 Dec 2009, 5:00 AM
Doesn't happen with either, the code runs fine.

dtex-lab
21 Dec 2009, 5:04 AM
it is very strange..
I rtry to use the "non" debug version



<script type="text/javascript" src="lib/extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="lib/extjs/ext-all.js"></script>
<script type="text/javascript" src="lib/extjs/ux/ux-all.js"></script>


and the exception change: get a look to NonDebugImport.jpg

evant
21 Dec 2009, 5:15 AM
I just downloaded 3.1.0 final, created a page in the root directory, dropped in this code:



<html>

<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<link rel="stylesheet" type="text/css" href="resources/css/ext-all.css"
/>
<link rel="stylesheet" type="text/css" href="examples/ux/css/ux-all.css"
/>
<script type="text/javascript" src="adapter/ext/ext-base-debug.js">
</script>
<script type="text/javascript" src="ext-all-debug.js">
</script>
<script type="text/javascript" src="examples/ux/ux-all-debug.js">
</script>
<script>
Ext.onReady(function() {
Ext.QuickTips.init();
Ext.Msg.show({
title: "ux-all-debug.js error",
msg: "TreeGridColumn.js into ux-all-debug.js create an exception",
minWidth: 200,
modal: true,
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
});
});
</script>
</head>
</body>
</html>


And it all works as expected, the MessageBox shows with no error. I suggest you check that all files were included properly and copied over correctly.

Marking this as closed.

dtex-lab
21 Dec 2009, 5:22 AM
Evant

maybe there is a misunderstanding... the message box will show correctly also to me with my testcase...
but if you see the firebug console.. you can see my reported exception...

So it works as aspected.. but console repors the exception

evant
21 Dec 2009, 5:23 AM
I don't see anything in FireBug either.