Of course, you'd save yourself all of this trouble by using event
delegation[1]. :)
Best,
Tobie
[1] http://proto-scripty.wikidot.com/faq#delegation
On Nov 14, 2:04 pm, bluezehn <[EMAIL PROTECTED]> wrote:
> Yep cheers T.J. This all makes alot of sense. Nice to understand
> everything rather tha
Yep cheers T.J. This all makes alot of sense. Nice to understand
everything rather than just go about doing things in a certain way
because it's the "done" thing!
On Nov 14, 11:02 am, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> > My tactic is going to be to stop defining them inline, ther
Hi,
> My tactic is going to be to stop defining them inline, therefore not
> causing a closure...
Yeah, I mean, it's not something you need to be paranoid about at all,
just something to keep in the back of your mind when you're dealing
with large numbers of things. Small numbers of things are
Thanks T.J., very useful.
I'm defining a lot of closures for my event handlers, ie, defining the
functions for them inline (element.observe('click', function() { bla
bla bla });), which are probably therefore using far too much memory.
My tactic is going to be to stop defining them inline, therefo
Hi,
> 1 ) But the problem is it's turned out to be a bit of a memory eater
> as there's quite a lot of methods on both classes.
That shouldn't be a problem if you're using Class.create, it assigns
the methods to the prototypes so the methods are shared across all
instances. Are you trying to cr
On Nov 13, 6:22 pm, bluezehn <[EMAIL PROTECTED]> wrote:
> I've extensively used class.create for a calendar - each week has a
> class containing 7 days, also represented as objects of a class.
>
> 1 ) But the problem is it's turned out to be a bit of a memory eater
> as there's quite a lot of meth