Changes between Initial Version and Version 5 of Ticket #10061


Ignore:
Timestamp:
Oct 16, 2009, 8:30:32 AM (10 years ago)
Author:
bill
Comment:

The problem is actually limited to non-_Contained widgets (ie, widgets w/out a getParent() method).

Notes to self:

  • I'd like to pass in a flag to the parser to not call startup() on any of the widgets, deferring that job to ContentPane, but that might cause problems for popup widgets like Menu and Dialog that reposition themselves outside of the ContentPane.
  • Alternately, it would be nice to disable the startup() calling code in ContentPane when the parser is turned on (ie, when parseOnLoad == true), but then would need to modify the parser's behavior to call startup() even on widget's whose parent is the ContentPane.
  • Performance: there's a lot of inefficiency in startup processing. The parser ends up calling getParent() for each widget w/a startup() method (which is all widgets, since startup() is defined in _Widget.js now) and a getParent() method, even though the parser could easily keep track of the parent-child relationship of all widgets if it did top down processing instead of calling dojo.query(). And each layout widgets calls getParent() again to decide whether startup() should call resize() or whether it should wait for a resize() call from it's parent widget.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10061

    • Property Component changed from Events to Dijit
    • Property Summary changed from ContentPane and TitlePane widjets get two startup events to ContentPane: non _Container widgets loaded via href get two startup events
    • Property Milestone changed from tbd to 1.4
    • Property Owner changed from sjmiles to bill
  • Ticket #10061 – Description

    initial v5  
    1 With Dojo 1.3 or greater widjets in a ContentPane or a TitlePane receive two startup events. In Dojo 1.2 they only received one.[[BR]]
     1With Dojo 1.3 or greater simple widgets like dojo.form.Button in a ContentPane or a TitlePane receive two startup events. In Dojo 1.2 they only received one.[[BR]]
    22[[BR]]
    3 I have a page where some of the widjets sometimes need to launch some code after startup.  I've been using the startup event to launch the code, so with Dojo 1.3 and 1.32 the code gets launched twice - which is unacceptable. I got around the issue by having the code use the Title attribute of the widjet to see if it had already been run or not.[[BR]]
     3I have a page where some of the wigets sometimes need to launch some code after startup.  I've been using the startup event to launch the code, so with Dojo 1.3 and 1.3.2 the code gets run twice - which is unacceptable. I got around the issue by having the code use the Title attribute of the widjet to see if it had already been run or not.[[BR]]
    44[[BR]]
    55Sample file attached. I apologize for using a local Dojo store but I can't get those !%#$@ CDN's to work right.