Doug Turner wrote:
> 
> This would be a cool utility to have built in the mozilla tree.

Doug, Jband, this raises a question i've been thinking about that is
kind of realated to this.

Is there a way to register and initialize a js object on the global
level w/out having to use xpconnect to initialize the object(s)?

So, say for example i want to have `file.js' registered at runtime like
a component but have the object readily available w/out the overhead of
xpconnect pre massage code since the wrapper handles this stuff.

So package authors can just say.

var f=new File('myFile');

Since `file.js', etc, is wrapper code created for ease/speed of use, it
would be real cool if there was a way to easily link to these kinds of
objects w/ having to include them in your xul or js files. 

Like a directory like `components' (say jsl) that is read and loaded at
runtime that will automatically initialize newly added `.jsl' files. 

Then 'easy to use' libraries can be added via xpinstall, and linked
against from various packages.
Updated in paralell w/ the underlying xpcom implementations, easily . .
. 
As long as old interface API's are maintained for compatabitity there
should be minimal breakage in the wrappers.

Ideas? 

--pete


> 
> pete collins wrote:
> 
> > > Thanks pete. There's an easier way to do anything :)
> > >
> > > function findError(code) {
> > >   for(var name in Components.results)
> > >     if(Components.results[name] == code)
> > >         return code + " is " + name;
> > >   return code + " not found"
> > > }
> >
> > Thanks Jband.
> >
> > I am getting verbose in my old age. ;-)
> > I hate writing fat inefficient code!
> >
> > --pete

Reply via email to