Login Register

inheritance

Widget multiple inheritance

I have a dijit.form.SimpleTextarea widget which i would like to extend with a behavior of my custom seminar.URLValidation widget (seminar.URLValidation extends dijit.form.TextBox) to create a seminar.seminarNonblankTextarea widget. Is there a way, other than copy pasting all of the code? My idea was this

dojo.provide("seminar.seminarNonblankTextarea");
dojo.require("dijit.form.SimpleTextarea");
dojo.require("seminar.nonblankValidate");

dojo.declare("seminar.seminarNonblankTextarea", dijit.form.SimpleTextarea, seminar.nonblankValidate,{ 
});

Inheritance and calling parent's constructor

[editor: moving to the appropriate forum…]

(Using dojo 1.1.1)
Can anyone spot why the parent class's constructor is not called when constructing a new instance of my class?

In the following piece of code, dojo creates the dojoSelect widget and properly assigns it to input#dojoNode.
It also creates the mySelect widget but fails to assign it to input#myNode.

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;
}

which mixin to inherit

Hello,

I'm having trouble with finding the correct mixins to inherit. I have a widget, and it works If I inherit dijit.layout.ContentPane, dijit._Templated, dijit._Contained, however, if I remoce dijit.layout.ContentPane, it stops working. and container widget is a [dijit._Templated, dijit.layout._LayoutWidget].

from what I undertstood I could have used _Container, and _Container, but it doesnt seem to work, if I change it. What am I missing? Is there a page in the book that described what each mixin will add?

thanks,
Ahmet

Lost in inheritance, help would be appriciated (dojo 0.9 -> 1.0)

hi

I would appriciate some help of the more experienced users on this forum.

I have a collection object, and an gallery widget In dojo 0.9 I would call my gallery widget and pass the collection object as parameter in the new () statement.

In the constructor() I could then access via this.method the methods from the collection object, however in 1.0 it doesn't do that anymore.

Syndicate content