Opened 6 years ago

Closed 5 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

Change History (9)

comment:1 Changed 6 years ago by bill

Component: DojoxDojoX Mobile

comment:2 Changed 6 years ago by Patrick Ruzand

Owner: set to Patrick Ruzand
Status: newassigned

comment:3 Changed 5 years ago by Patrick Ruzand

Milestone: tbd1.10

comment:4 Changed 5 years ago by Patrick Ruzand

Priority: undecidedhigh

comment:5 Changed 5 years ago by Patrick Ruzand

Owner: changed from Patrick Ruzand to Sebastien Brunot

comment:6 Changed 5 years ago by Sebastien Brunot

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. It is defined in (and inherited from) the internal class dojox/mobile/_ItemBase, but I cannot find any class that use it in the dojo mobile codebase. 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.

Version 0, edited 5 years ago by Sebastien Brunot (next)

comment:7 Changed 5 years ago by Sebastien Brunot

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 5 years ago by Sebastien Brunot

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 5 years ago by Patrick Ruzand <pruzand@…>

Resolution: fixed
Status: assignedclosed

In 0fa07d641f046ff588a9a5d395f62ef170653677/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.