Have you seen the cool text input boxes on the Twitter homepage recently (make sure you are logged out). Twitter is using CSS transitions to achieve the effect but unfortunately those are still not fully adopted just yet. I created (with a bit of cleanup help from kgf on #dojo @ irc.freenode.net) a similar effect with Dojo and made a dojo.query() “plugin” out of it which does work in most browsers:
I’ve had many ask me about any workshops for developers who work with Dojo. When I direct them at SitePen, they always respond with, but those are geared towards companies—aren’t there any public workshops? Aside from telling them to read the documentation and getting involved online, I’ve had to reply with a solemn “no”. That has all changed as SitePen has announced that they are going to start an offering of public workshops.
They are going to offer two of them in San Jose for a first round, we’ll see what happens after that. They’re $2500 a pop but it sounds like they will be covering a lot of great content!
Dojo provides the ability for developers to create Java-like classes with the powerful dojo.declare(). It does this by allowing you to easily create namespaced classes that support multiple inheritance (which are basically mixins). Provided in this functionality is the ability to call:
… from within any of your methods in a class that extends another and have it call the super class instance of that method in the same way you would call super() in a Java class to call the super class’ method.
This past week I was on a couple of new classes, one super class and another class that extends that super class. I called this.inherited() within my constructor of the class to call the super constructor. I was noticing something strange in Firebug though—my super class’ constructor was getting called twice even though I was only calling it once. I reproduced this in JSFiddle as you can see below:
To summarize, only use this.inherited() within non-constructor methods in your classes. I recall running into this issue once before so I thought I blog about it for my own personal reference and for that of others.