[Proto-Scripty] Re: Adding new objects from old objects

2010-04-28 Thread Jangla
Actually, to better pose my question, how can I create an object that contains an HTML element with an event listener that adds a new instance of the same object to the page (and with an incremented id)? Should I be adding the event listener from outside the object entirely? Or am I close but not

Re: [Proto-Scripty] Re: Adding new objects from old objects

2010-04-28 Thread Walter Lee Davis
Forgot to add -- this means that you could have one or twenty-one items inside of #foo, add some more, delete some, it doesn't matter. One handler will manage all of them, and in my example, bar == trigger n, no matter which trigger you clicked on, as long as you provide a little bit of

[Proto-Scripty] Re: Adding new objects from old objects

2010-04-28 Thread Jangla
Walter, that's really really helpful - thanks! I'm going to have a look at it some more, play with it and see what I can come up with. You may have even helped with other issues I've been having with a similar piece of code in the same app but I'll let you know on that one ;) On Apr 28, 4:21 pm,