Opened 7 years ago
Closed 7 years ago
#17463 closed defect (fixed)
item.callback and item.onOpen on IconItem never gets called
Reported by: | ken.vernaillen | Owned by: | Sebastien Brunot |
---|---|---|---|
Priority: | high | Milestone: | 1.10 |
Component: | DojoX Mobile | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
item.callback and item.onOpen on IconItem? never gets called.
http://stackoverflow.com/questions/18142771/dojo-callback-never-called-on-iconitem
Change History (9)
comment:1 Changed 7 years ago by
Component: | Dojox → DojoX Mobile |
---|
comment:2 Changed 7 years ago by
Owner: | set to Patrick Ruzand |
---|---|
Status: | new → assigned |
comment:3 Changed 7 years ago by
Milestone: | tbd → 1.10 |
---|
comment:4 Changed 7 years ago by
Priority: | undecided → high |
---|
comment:5 Changed 7 years ago by
Owner: | changed from Patrick Ruzand to Sebastien Brunot |
---|
comment:7 Changed 7 years ago by
After a few more research and test, here is the current status:
1) callback is only called when transition destination specified with moveTo (see the onStartTransition method of dojox/mobile/ViewController)
2) onOpen is only called for "below" transitions
So they do not never get called.
My understanding of the current problem is that no callback can be defined to be executed after a transition specificed by an URL has been performed. I will look into this.
comment:8 Changed 7 years ago by
I've created a pull request for a fix that solves the issue of the callback method not called after a transition when the transtion target is specified using the url property: https://github.com/dojo/dojox/pull/71
comment:9 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
onOpen is correctly called, but only when the transition is set to "below". Looking at the code, this seems to be by design. The documentation for the onOpen function doesn't explain this, though, because it simply states: "Stub method to allow the application to connect."
callback is indeed never called. Research in the code base history shows that the last version it was used is the following (dating from may 2011): https://github.com/dojo/dojox/blob/b1133c6135137f651987253904940a8a8ebb1a52/mobile/_ItemBase.js. In the next version, it disappeared: https://github.com/dojo/dojox/blob/f59a79efe5a2d9836260b2df8874306690dca855/mobile/_ItemBase.js
I'll continue to investigate in order to understand what it was meant to be replaced with.