[For Developers]Tricks when developing & debugging

65 views
Skip to first unread message

PikachuEXE

unread,
Oct 4, 2011, 10:01:39 AM10/4/11
to tabkit-2n...@googlegroups.com
The use of shortcut

I have just encountered a bug that is caused by the use of shortcut
Code:

called earlier: var _tabInnerBox = gbrowser.abc(Private member)

called later: var scrollbar = _tabInnerBox.def

scrollbar becomes undefined!!!
But if you use this, it will give you the correct one:
gbrowser.abc.def

So when you are debugging, make sure you test the code without using shortcut first!!



PikachuEXE

unread,
Oct 16, 2011, 9:52:50 PM10/16/11
to tabkit-2n...@googlegroups.com
Tips from rejection after review:

1) The use of eval is deprecated for security reasons and a safer alternative is required (https://developer.mozilla.org/en/XUL_School/Appendix_C:_Avoid_using_eval_in_Add-ons).

Also,

2) Variables referencing function names are deprecated, instead anonymous functions are used with setTimeout and setInterval, i.e. setTimeout(doSomething) → setTimeout(function () { doSomething(); }).

PikachuEXE

unread,
Nov 16, 2011, 10:39:07 PM11/16/11
to tabkit-2n...@googlegroups.com
midWidth of tabs can only be changed though overwriting & manipulating CSS rules
Although the API for styles still exists it doesn't work
FF4+ change is really big...

PikachuEXE

unread,
Dec 9, 2011, 9:47:50 PM12/9/11
to tabkit-2n...@googlegroups.com
Some namespace would become undefined (lost?deleted?) after a browser window is closed
Some errors might be generated after that
Such as
PlaceUtils (module)
getTopWin (a funciton in utils.js)
Reply all
Reply to author
Forward
0 new messages