By making thread a dynobject, it gets a unique identifier that is usable anytime. You also get all the methods of a DynObject, but don't worry about overweight. You only bind the prototype chains of both objects, making all thos DynObject method available to the Thread, but they are not copied and no extra memory is needed. [EMAIL PROTECTED] wrote: > question I got lost from this one : > > function Thread(dlyr) { > // Inherit from object. Provides unique ID > this.DynObject = DynObject > this.DynObject() > > this.setDynLayer(dlyr); > } > Thread.prototype = new DynObject; > > now let's say that on a page I have : > > thread = new Thread(); > thread.sleep(20); > thread.run = function() { > status = "run"; > hover.run(); > circle.run(); > path.run(); > } > thread.start(); > > alert(thread.deleteFromParent) > > this will alert function(){bla bla bla } > > and I cna do the same for each method of DynObject > > now my question is why attaching all those method to something like thread? > > it will never use 'em or am I missing something? > > ciao > Y > > _______________________________________________ > Dynapi-Dev mailing list > [EMAIL PROTECTED] > http://lists.sourceforge.net/lists/listinfo/dynapi-dev _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/dynapi-dev
Re: [Dynapi-Dev] Thread.prototype = new DynObject
Jordi - IlMaestro - Ministral Mon, 02 Apr 2001 13:53:58 -0700
- [Dynapi-Dev] Thread.prototype = new DynObjec... nicola
- Re: [Dynapi-Dev] Thread.prototype = new... Jordi - IlMaestro - Ministral
- Re: [Dynapi-Dev] Thread.prototype = new... nicola