#12846 closed enhancement (wontfix)
Method "startupAt" for widgets
Reported by: | lazaridis_com | Owned by: | bill |
---|---|---|---|
Priority: | low | Milestone: | tbd |
Component: | Dijit | Version: | 1.6.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The "startupAt" function would work similar to the existent "placeAt". It would do nothing more than:
- call placeAt(node)
- call startup
- return this
The usage would be simple:
tree1 = new Tree().startupAt('TreeDiv');
Related discussion:
Change History (5)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Making startup() chainable was my initial thought, but I refrained, as this can break existent behavior.
Additionally, if I would see code where "placeAt(node).startup();" is used repeatedly, I would immediately ask: why not in one function, e.g. "startupAt"?
(please use the mailing-list topic for further discussion, I've understood that this is the process within the project)
comment:3 Changed 8 years ago by
Component: | DojoX Widgets → Dijit |
---|---|
Owner: | changed from dante to bill |
Priority: | high → low |
Status: | new → assigned |
Bill, thoughts on this one? This is a suggestion for a syntactic sugar clean-up for placeAt + startup.
comment:4 Changed 8 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
placeAt() does return "this", so placeAt(node).startup() is possible.
Also, since [28251] placeAt() sometimes calls startup() implicitly, but not in all cases. Maybe that should be changed for 2.0. I'll add a note to the code for that.
But I don't want to add a separate startupAt() method.
What advantage does this beyond obfuscating placeAt() over the previous developers suggestion of making startup() return "this" so:
works as expected?