So... I try to study it by first refactoring ALL XHR in the script... So ... I know ... where I click the UI fires what XHR and links to which UI component.
When I was refactoring the script ... I found that ... when I open a XML with the CodeMirror integrated editor and then close it after loading ... Firebug tells me the following ...
"method is not defined" ... At first ... I was wondering if it's my introduced error ... So ... I spent time to setup another environment with cvs no-modification copy... But I still get the "method is not defined".
Then I see the green wordings saying the stuff relating to i18n ... So ... I spent time to look at it. I'm wondering is this a problem related to script include sequence in the php file or cross script reference issue .... This is because I googled: "javascript method is not defined" and read a stackoverflow page.
As time passes by ... I figure out that it could not be the referencing issue anymore when I try the bug reproduction steps again and again with one slight change.
Original reproduce procedure...
1. double click on a XML in "Files Need update"
2. close the newly opened tab after loading complete
3. you could get the err from firebug...
The slight modifed one...
1. double click on a XML in "Files Need update"
2. wait for a few second after loading complete
2. close tab
3. It's FINE!!!
The only thing I can do is to read the stack trace :p
> method is not defined
> _("Loading...") main.js (line 5)
> getFile()("9f389d22c5cd3246733a5c672c6dcf0f", "hk/chapters/","tutorial.xml", "FNU-LANG-PANEL-", "FNU-LANG-")
> main.js (line 1759)
> initialize()() main.js (line 4743)
> DomHelper()() ext-all.js (line 9)
> DomHelper()() ext-all.js (line 9)
> onInit()() Ext.ux.C...Mirror.js (line 59)
> init()() codemirror.js (line 153)
> method() util.js (line 8)
>
> var str = i18n[key];
> initialize()() main.js (line 4743)
> DomHelper()() ext-all.js (line 9)
> DomHelper()() ext-all.js (line 9)
> onInit()() Ext.ux.C...Mirror.js (line 59)
> init()() codemirror.js (line 153)
> method() util.js (line 8)
>
> var str = i18n[key];
As you can see from the bold ... method is not defined is really a method which can be found by CodeMirror source ........ Then I look at the source and found that util.js is included using an iframe ... so ... step 2 ... "wait for a few second after loading complete" WORKS!
Next time ... i will see the stack trace before interrupting what's an error message actually mean......... :p silly man~
No response to “my gsoc2009 @ May 18”
Post a Comment