Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destroyable.own supports Deferred but not documented #174

Open
claudeG opened this issue Nov 2, 2019 · 2 comments
Open

Destroyable.own supports Deferred but not documented #174

claudeG opened this issue Nov 2, 2019 · 2 comments

Comments

@claudeG
Copy link

claudeG commented Nov 2, 2019

Hello !

dijit.Destroyable.own source code indicates than this method accepts Deferred objects. Nevertheless this is not documented. Is there any reason for that?

Deferred reference documentation could mention it too. Any strategies, « patterns » related to the prévention of callback calls and Deferred cancellation due to the destruction of the Destroyable - widget or else- targetted by callbacks would be welcome too.

Thank you.

@wkeese
Copy link
Member

wkeese commented Nov 6, 2019

It's probably just an oversite, but I should mention a standard Promise (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise), unlike dojo's promise/Promise object, doesn't have a cancel() method, so calling own() on a standard Promise doesn't make sense.

@jithendraTR
Copy link

Hi Team, We are facing one issue with latest dojo and dijit upgrade to 1.17.3, we have our calendar view using widgets to display labels under each date, so when we are routing back (using router.go) to other view dojo is trying to destroy the widgets in calendar page and the below error was getting occurred with page getting struck without navigating to other view, with the older version of dojo/dijit like 1.9.X there wasn't any issue and navigation was working fine, if you could please check and let us know how this can be resolved it will be of great help and much appreciated. Thanks a lot in advance.

Error:
TypeError: handle[destroyMethodName] is not a function
at Object. (https://xxxxxxxxxxx.com/current/js/dojo/dojo.js:20675:31)
at Object.dispatcher [as destroy] (https://xxxxxxxxxxx.com/current/js/dojo/dojo.js:8640:29)
at Object._destroyRenderer (https://xxxxxxxxxxx.com/current/js/dojox/calendar/ViewBase.js:2:10728)
at Object.destroy (https://xxxxxxxxxxx.com/current/js/dojox/calendar/ViewBase.js:2:1306)
at Object.inherited (https://xxxxxxxxxxx.com/current/js/dojo/dojo.js:11345:30)
at Object.destroy (https://xxxxxxxxxxx.com/current/js/dojox/calendar/MatrixView.js:4:2908)
at Object.advice (https://xxxxxxxxxxx.com/current/js/dojo/dojo.js:8666:23)
at Object.dispatcher [as destroy] (https://xxxxxxxxxxx.com/current/js/dojo/dojo.js:8646:39)
at Object.destroyRecursive (https://xxxxxxxxxxx.com/current/js/dojo/dojo.js:19994:9)
at destroy (https://xxxxxxxxxxx.com/current/js/dojo/dojo.js:20017:8)TypeError: handle[destroyMethodName] is not a function
at Object. (https://xxxxxxxxxxx.com/current/js/xx/xxx/xxxxxx.js:1883:26)
at signalListener (https://xxxxxxxxxxx.com/current/js/dojo/dojo.js:7263:21)
at Deferred.then.promise.then (https://xxxxxxxxxxx.com/current/js/dojo/dojo.js:7484:5)
at Object. (https://xxxxxxxxxxx.com/current/js/xx/xxx/xxxxxx.js:1874:53)
at signalListener (https://xxxxxxxxxxx.com/current/js/dojo/dojo.js:7263:21)
at Deferred.then.promise.then (https://xxxxxxxxxxx.com/current/js/dojo/dojo.js:7484:5)
at Object._go (https://xxxxxxxxxxx.com/current/js/xx/xxx/xxxxxx.js:1869:55)
at Object. (https://xxxxxxxxxxx.com/current/js/xx/xxx/xxxxxx.js:1557:10)
at Object. (https://xxxxxxxxxxx.com/current/js/xx/xxx/xxxxxx.js:3267:10)
at Evented.dispatcher [as on/dojo/hashchange] (https://xxxxxxxxxxx.com/current/js/dojo/dojo.js:8653:39)

Error snapshot:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants