namespace

Optimising and status issues

In my grand namespace conversion I've run into problems with method binding, the problem is that this is only this when called from inside the object/namespace. So things get messy when you call into the namespace from outside or anything like that. I think this is causing a number of strange problems, for example when I add a song status stops working altogether. So I was happy to read about MochiKit.Base.bind() which binds a method to an object so that references to objects become less confusion. I'm hoping that this will help to solve these problems, but right now it's 4:48am and I can't be required to understand code anymore.

alexbl – Fri, 2006 – 06 – 02 08:39

Namespace!

Well, yesterday I did the CSS namespace conversion so today I started on the JavaScript namespace (everything was in global namespace before). I now have a Commands constructor and can instantiate a Commands object with:

commands = new Commands();

So now that commands are all in their own object/namespace I can access them like commands.addEntry() It's nicer this way because I've had some problem with stuff bleeding into the global namespace and confusion other functions (like i had one function with an artist variable that was confusing another function that also had an artist variable).

alexbl – Tue, 2006 – 05 – 30 08:29
Syndicate content