Sunday, May 31, 2009

my gsoc2009 @ May 31

This is again not a good day for coding .... But the day to learn coding -.-"

Let's consider the following js...

var items = this.items;
if (items) {
delete this.items;

Have you ever think of ... "this.items" is still exist after the delete statement??

This is why i said today is not that good for coding :p

Sooooooooooo, let me explain wt's actually happening...

When i'm refactoring the codes of doc-editor ... I do something like this ...

items of the ui-component are directly defined in the Ext.extend function.

BUT............ The devil comes!!!!!!

As you can see from the nice FireBug console ... Before the delete statement ... items are there... After the delete statement ... ITEMS ARE STILL THERE and making the initComponent CRASHES!!!

Right before I know the problem behind ... i guess it's Firefox bug ^^ then I tried on Chrome ... Same thing happen in Chrome's console .... SO... THat's not bug of browser ....

Wt next?? I dig into Ext.extend ... and think that's bug of Ext.extent ... BUT... Indeed ... it's not a bug but my poor understanding of javascript ~~~~~

From Ext.extend ... items are considered as prototype attribute SO THAT delete statement WONT work here....

Solution! prevent using extend statement for defining the itemssssssssssssssss

This morning... I spent another hour to fight against a bug due to Ext.extend(). In addition to items, overriding tbar + bbar as prototype attribute DOES ALSO CRASH extjs. Looook OUT!!

No response to “my gsoc2009 @ May 31”

© 2009 Emptiness Blogging. All Rights Reserved | Powered by Blogger
Design by psdvibe | Bloggerized By LawnyDesignz