Subj : Re: Creating classes/namespaces on the fly from existing functions? To : netscape.public.mozilla.jseng From : Brendan Eich Date : Fri Jan 07 2005 10:09 am bubbfree@gmail.com wrote: > Very cool. That works perfectly. Thanks Brendan. > > What's your opinion of the 2nd part, where instead of explicitly asking > the user to call addLibrary(...), I trap an error call and attempt to > do the lookup myself? I think it's better to have an explicit "import" mechanism. JS2 does, trying to keep that in ECMA Edition 4. See http://www.mozilla.org/js/language/js20/ . > I was digging around and also noticed JS_SetDebugErrorHook() in the > debug API files. From the .c's it looks like this is called before a > real error is thrown. That's for the debugger, not for general API consumers. /be .