[Dojo-interest] building on ComboBox widget
Josh Reed
obitus9982 at gmail.com
Mon Apr 24 08:17:35 MDT 2006
Do you have to explicitly dojo.require() the ComboBox e.g.
dojo.require("dojo.widget.html.ComboBox");
I can't remember if dojo.require("dojo.widget.*") will automatically
pull it in or not for you.
On 4/24/06, Tijs Teulings <tteulings at gmail.com> wrote:
> I am using the Dojo nightly and need a slightly modified version of
> the ComboBox. I need to override both the CSS template and the
> openResultList function and i tried a few methods but are having some
> trouble. I now have:
>
> ---------------- TransComboBox.js ---------------------
>
> dojo.provide("local.TransComboBox");
>
> dojo.require("dojo.event.*");
> dojo.require("dojo.widget.*");
>
> local.TransComboBox = function() {
>
> dojo.widget.ComboBox.call(this);
>
> this.templatePath = null;
> this.templateCSSPath = dojo.uri.Uri("../tests/effects/local/
> widget/templates/ComboBox.css");
>
> this.widgetType = "TransComboBox";
>
> }
>
> dojo.inherits(local.TransComboBox, dojo.widget.ComboBox);
> dojo.widget.tags.addParseTreeHandler("dojo:transcombobox");
>
>
> ----------------------------------------------------------------
>
>
> -------- test_transcombobox.html (fragment) ------
>
> <script type="text/javascript">
> dojo.require("dojo.widget.*");
>
> // Load user custom widgets
> dojo.hostenv.setModulePrefix('local', '../tests/effects/local/widget');
> dojo.widget.manager.registerWidgetPackage('local');
>
> dojo.require("local.TransComboBox");
> </script>
>
> </head>
> <body>
> <select dojoType="transcombobox">
> <option value="foo">foo</option>
> <option value="bar">bar</option>
>
> <option value="baz">baz</option>
> <option value="thud">thud</option>
> </select>
>
> ----------------------------------------------------------------
>
> The result is a "FATAL: superclass: undefined borken" error message.
> Any hints? I've been looking at this too long...
>
> Regards,
> Tijs
>
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
More information about the Dojo-interest
mailing list