[Dojo-interest] Widget startup() called twice
wkeese at gmail.com
Sun Sep 27 08:16:29 EDT 2009
You could hook up to create().
As for "intended behavior" we aren't trying to call startup twice but it's
not the end of the world; our primary goal is to make sure it gets called at
least once, and then avoiding re-calling it is secondary.
On Sun, Sep 27, 2009 at 8:03 PM, K.L. <coviex at gmail.com> wrote:
> Of course I can set a flag, but I was wondering if it's dojo's
> intended behaviour to call startup() twice and if there is other
> methods I can hook to find out that child widgets have been
> On Sat, Sep 26, 2009 at 5:28 PM, Bill Keese <wkeese at gmail.com> wrote:
> > Yah, that's likely that we call startup() twice in some situations
> > we aren't sure if it's already been called or not.
> > Why not just set a flag (this._myStartupWasRun = true) so you can just
> > return the second time?
> > On Fri, Sep 25, 2009 at 2:07 AM, K.L. <coviex at gmail.com> wrote:
> >> I have a script which loads content via xhrGet() and inserts loaded
> >> data into dojox.layout.ContentPane via oPaneInstance.attr('content',
> >> data).
> >> Data loaded contains markup widgets (form widgets, tabs etc).
> >> Widget of major interest is dijit.form.form. Right after openning tag
> >> it has code like this:
> >> --script type="dojo/connect" event="startup"--
> >> console.log(this.id);
> >> // real func which adds interactivity to child comboboxes
> >> here
> >> --/script--
> >> And the problem is that console.log() called twice. (Debugger says it
> >> is called once on openning tag and once on closing tag). This ruins my
> >> real function and I don't understand why it is called twice.
> >> I tried to use "oPaneInstance.containerNode.innerHTML = data;
> >> dojo.parser.parse();" instead of "oPaneInstance.attr('content',
> >> data)". This makes console.log() to be called only once, and
> >> everything's ok with other contentpanes and comboxes, but TabContainer
> >> is not started. oPaneInstance.startup() doesn't help.
> >> I'm stuck. Help!
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> Dojo-interest at mail.dojotoolkit.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dojo-interest