PDA

View Full Version : b is null error



jmtoporek
28 Sep 2009, 6:10 AM
Here's my page - http://www.congruencewebdev.com/dev/jquery_table_gui/page-layout.php

This thing works fine until I try to add tabs to the info-tab-container. If you click on the tree listing on the right the corresponding tab container appears. As of right now only the movies container has real data.

This seemed to work fine until I tried to create tabs inside of the movies-tab-container. The only error I get is b is null, and the source of the error is in the extjs code. I am sure it is my own doing, but unfortunately the source of the code failing is not in my source code so it's a lot harder to debug. Here's the code;


var tabs_movies = new Ext.TabPanel(
{
itemId: 'testing-movies',
renderTo: 'movies-table-info-tabs',
id: 'movies-info-tabs',
deferredRender: false,
activeTab: 0,
frame:true,
defaults:{autoHeight: true},
items:[
{
contentEl:'movies-table-data-tab', title: 'Table Data', itemId: 'table-data-movies', frame: false, id:'movies-data'
},
{
contentEl:'movies-table-schema-tab',
title: 'Table Schema',
itemId: 'table-schema-movies',
id: 'movies-schema',
frame: false
}]
});Any ideas as to what I am doing wrong here? I'm up for any suggestion as to how to resolve this problem.

28 Sep 2009, 6:20 AM
My first suggestion is to use ext-all-debug.js


Why are you setting the id and ItemId?

jmtoporek
28 Sep 2009, 6:42 AM
I really appreciate your help Mr. Garcia.

First I don't even know where to start to use the ext-all-debug.js, not sure where to start in order to use this. I just added this to the code and now I am getting a new error is ct is null.

I will totally buy your book this week.

Why am I setting the id and Itemid? Since I am more familiar with jquery I like giving everything an ID should I need to access it one way or another. I am still transitioning to learn this library, plus I find it annoying that extjs adds so many items to the DOM.

On an tangent note - you knowledge of extjs, did you just pick it up on your own, have you been part of the development team? I am still doing my best to take what I've learned from other books and re-purposing it into my own code. I realize extjs is far more complex and capable of doing more things, or at least doing the same things far faster with less code on the part of the developer. However the documentation with jQuery is very straight forward and is easy to understand. The documentation for extjs while detailed can be rather difficult and oblique.

Animal
28 Sep 2009, 9:54 AM
That's because they are different.

jQuery is a pretty simple little foundation library which wraps the DOM and provides abstractions for adding event handlers to elements, selecting elements from the DOM and styling them.

ExtJs is a fully fledged UI management system.

But the basic problem is that you do not try to debug. Whatever you are doing, in whatever language, you can debug. That means setting breakpoints in code, or setting the runtime to break to the debugger when an error occurs, and then examining the state of the code and variables at that point.

ketan404
27 Feb 2010, 2:40 AM
I also get the same error.

b is null

The page works well in FF but not in IE.

Can someone tell me what's wrong with the code ?

The prototype page is here
http://www.assurantiecollectief.nl

Thank you.
Ketan

Animal
27 Feb 2010, 1:59 PM
Trailing comma.

ketan404
28 Feb 2010, 8:54 PM
Trailing comma.

That hint was helpful. Thank you!

IE does not like trailing commas.

softwareengineer
2 Jun 2010, 1:02 AM
That hint was helpful. Thank you!

IE does not like trailing commas.

I am getting same error in FF
can you please help me to resolved it.