-
28 May 2012 7:45 PM #1
suspend/resume events issues
suspend/resume events issues
The above code does not work, ie setting suspendEvents(false) does not clear out the event queue....Code:var me = this; if (record.data.Link.length > 0) //link { //populate link if (record.data.Link.substr(0,5) == 'http:') iframe = '<iframe class="iframelink" src="'+record.data.Link+'"></iframe>'; else iframe = '<iframe class="iframelink" src="http://'+record.data.Link+'"></iframe>'; Ext.ComponentQuery.query('#LibraryBrowserContainer')[0].setHtml(iframe); //save LibraryFolderID Ext.ComponentQuery.query('#LibraryIDHiddenField').value = record.data.LibraryFolderID; me.record = record; //stop scroll to next level - highlight listitem nestedlist.suspendEvents(false); //e.stopEvent(); } else if (record.data.DocumentID > 0) //document { //populate document body var document = me.GetDocumentBody(record.data.DocumentID); Ext.ComponentQuery.query('#LibraryBrowserContainer')[0].setHtml(document); //save LibraryFolderID Ext.ComponentQuery.query('#LibraryIDHiddenField').value = record.data.LibraryFolderID; me.record = record; //stop scroll to next level - highlight listitem nestedlist.suspendEvents(false); //e.stopEvent(); } else if (record.data.Deletable) //empty folder { } nestedlist.resumeEvents();
Any ideas why?
-
30 May 2012 8:54 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
Looking at the source, we actually don't do anything with the argument.
Code:/** * Suspends the firing of all events. (see {@link #resumeEvents}) * * @param {Boolean} queueSuspended Pass as true to queue up suspended events to be fired * after the {@link #resumeEvents} call instead of discarding all suspended events. */ suspendEvents: function(queueSuspended) { this.eventFiringSuspended = true; }, /** * Resumes firing events (see {@link #suspendEvents}). * * If events were suspended using the `queueSuspended` parameter, then all events fired * during event suspension will be sent to any listeners now. */ resumeEvents: function() { this.eventFiringSuspended = false; },Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
30 May 2012 6:29 PM #3
So thats a BUG then
So thats a BUG then
Can you suggest how I should go about cancelling all the events in the queue
at that point then?
I'm thinking jquery 'unbind', but how do I name the events in the queue?
cheers
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-3930
in
2.2.0-b1.


Reply With Quote