now i m extending this widget to create new templated widget (label.js)
In this i am facing one error "mixin #2 is not a callable constructor" in
dojo.js
i am not able to identify exact coz of this error
My project structure is
http://dojo-toolkit.33424.n3.nabble.com/file/n3722666/custom1.jpg
My base widget is
http://dojo-toolkit.33424.n3.nabble.com/file/n3722666/custom4.jpg
My widget(label) which extends base widget(parentLabel) is
http://dojo-toolkit.33424.n3.nabble.com/file/n3722666/custom3.jpg
My index page is
http://dojo-toolkit.33424.n3.nabble.com/file/n3722666/custom2.jpg
finally error which i am getting is
http://dojo-toolkit.33424.n3.nabble.com/file/n3722666/custom5.jpg
Plz see to it,
and plz reply ASAP.
Waiting for reply ..
-----
Regards,
Swapnil :)
--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Extending-My-custom-Widget-in-1-7-1-Error-mixin-2-is-not-a-callable-constructor-tp3722666p3722666.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation
Dojo-i...@mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
-Karl Tiedt
i am having one query regarding your reply.
as u said, Is it compulsory to have return in code if we need to extend our
widget?
coz my above error ("mixin #2 is not a callable constructor") solved by ur
suggestion (ie. when i written return in parentLabel )
eg.
return declare("parentLabel",
[_WidgetBase],{
_i18n: i18n,
....
and in label.js
function(declare,_WidgetBase,_TemplatedMixin, parser,ready, parentLabel){
declare("label",
[_WidgetBase,_TemplatedMixin,parentLabel],{
templateString:"<div> ${translatedLabel}</div>"
......
in this case my lifecycle method are executed properly with out error.
but templateString is not rendered on page..
===========================================================
where as in other case i tried with
return declare("parentLabel",
[_WidgetBase],{
_i18n: i18n,
....
and
-----
Regards,
Swapnil :)
--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Extending-My-custom-Widget-in-1-7-1-Error-mixin-2-is-not-a-callable-constructor-tp3722666p3724903.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
in parentLabel.js
1)return statment (eg. return define("parentLabel"...... )
+
2) also added _TemplatedMixin in parentLabel.js
http://dojo-toolkit.33424.n3.nabble.com/file/n3725087/parentLabel.jpg
in label.js
no return statment..
==========================
code is working but my understanding is still not clear..
1) why to return from our widget..
and if in child class i m using return code is not running..
2) also one new question i came across.
if i want to specify template in child , is it necessory to have
_TemplatedMixin in base class??
coz when i have not putted it in my base class, template html was not
rendering
and after putting it is renderring..
-----
Regards,
Swapnil :)
--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Extending-My-custom-Widget-in-1-7-1-Error-mixin-2-is-not-a-callable-constructor-tp3722666p3725087.html
Hey , i got my code working,
changes i done are
in parentLabel.js
1)return statment (eg. return define("parentLabel"...... )
+
2) also added _TemplatedMixin in parentLabel.js
http://dojo-toolkit.33424.n3.nabble.com/file/n3725087/parentLabel.jpg
in label.js
no return statment..
==========================
code is working but my understanding is still not clear..
1) why to return from our widget..
and if in child class i m using return code is not running..
2) also one new question i came across.
if i want to specify template in child , is it necessory to have
_TemplatedMixin in base class??
coz when i have not putted it in my base class, template html was not
rendering
and after putting it is renderring..