Login Register

declare

Inheritance and malformed formal parameter

A newbie question on inheritance.

I wish to define several FilteringSelect objects. Those various objects differ only in their store and their prompt message. In order not to repeat myself, I am therefore tempted to declare a new class: MyFilteringSelect, which would predefine all the other parameters. Something like this:

var constructorMyFilteringSelect = function(params, srcNodeRef) {
this.autoComplete = false;
this.hasDownArrow = false;
this.labelAttr = "name";
this.queryExpr = "${0}*";
this.searchDelay = 0;
}

Trouble subclassing Moveable when using parser?

I believe I've found a bug in Dojo 1.1.1, where objects instantiated using the parser cannot be successfully subclassed. My demo code subclasses dojo.dnd.Moveable so that the objects start in random positions on the screen. I include two versions: one that works (using addOnLoad()), and one that doesn't (using the parser).

problems using dojo.declare

I am new to Dojo; am trying to make some simple object classes using dojo.declare. this is inside my head tag.

 

//

Syndicate content