Ticket #2772 (closed defect: invalid)
Overriding class initializer method in a sub-class causes the parent method to run AND the sub-class method as well
| Reported by: | guest | Owned by: | anonymous |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core | Version: | 0.4.1 |
| Severity: | normal | Keywords: | dojo.declare, initializer, override, inherit |
| Cc: |
Description
When you use dojo.declare to create a class with an initializer method, and you create a sub-class that inherits that class with its' own initializer method, when an object of the sub-class is instantiated it will execute the parent class' initializer method, followed by the sub-class' initializer method as well.
It seems you can successfully override all other methods in the parent class without this problem, so it appears to be limited to just the initializer method.
Change History
Note: See
TracTickets for help on using
tickets.