correct way to destroy scheduler

Ask for help relating to our Sencha Touch based Scheduler (for iPad, or any other supported phone, phablet or tablet)
User avatar
pincherhgz
Posts: 78
Joined: Mon Oct 27, 2014 11:40 am

correct way to destroy scheduler

Post by pincherhgz »

we are creating a scheduler panel in a navigation view. When we create the scheduler the first time everything is fine. On navigating up the navigation view we destroy the scheduler panel.
The second time we create the scheduler and do a drag&drop of an event from one resource to another, an error occurs on the delete line (record as well as index are undefined)

Code: Select all

    onStoreUpdate : function (store, record, index/*, oldIndex, modifiedFieldNames, modifiedValues*/) {
        if (!this.isPopulated) return
        if (this.queue.isRunning) this.queue.flush();
        
        delete this.rowsCache[ record.internalId ]
...

what is the correct way to destroy/delete the scheduler that it can be recreated ?

User avatar
pincherhgz
Posts: 78
Joined: Mon Oct 27, 2014 11:40 am

Re: correct way to destroy scheduler

Post by pincherhgz »

just some missing info, we are using the beforeeventdropfinalize event to decide if we allow the drop or not. In case of the above described error we just return a false from the method wfMcheckEventDrop and branch to dragContext.finalize() where the error occures

Code: Select all

        beforeeventdropfinalize: function( panel, dragContext, e, eOpts ){
            // fired before the start/end are set
            // ! the converts in the model are called again later automatically what overwrites the data !
            // everything is available in dragContext to be stored
            wfMdragContext = dragContext;
            if (wfMcheckEventDrop(dragContext)){
                return true;
            } else {
                dragContext.finalize();
                return false;
            }
        },

User avatar
mats
Core Developer
Core Developer
Posts: 16756
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: correct way to destroy scheduler

Post by mats »

This seems to be a bug in our product. Working on a fix. Ticket: https://www.assembla.com/spaces/bryntum ... ity/ticket:
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
mats
Core Developer
Core Developer
Posts: 16756
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: correct way to destroy scheduler

Post by mats »

Any way you could provide us a test case?
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
mats
Core Developer
Core Developer
Posts: 16756
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: correct way to destroy scheduler

Post by mats »

No bug found, not reproducible. Test case would help a lot.
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
pincherhgz
Posts: 78
Joined: Mon Oct 27, 2014 11:40 am

Re: correct way to destroy scheduler

Post by pincherhgz »

we created the attached test case with 2 buttons
- scheduler, shows a panel, creates the schedulerGrid
- dummy, destroys the schedulerGrid

in this test case we always return with false in this event call:

Code: Select all

            beforeeventdropfinalize: function( panel, dragContext, e, eOpts ){
                dragContext.finalize();
                return false;
            },
the problem with this test case is that the first time it works well, the second time it is not even possible to drag&drop
Attachments
Scheduler.zip
(1.1 MiB) Downloaded 1341 times

User avatar
mats
Core Developer
Core Developer
Posts: 16756
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: correct way to destroy scheduler

Post by mats »

Sorry, can't use this test case.

1. Crashes for me during initial rendering:

Uncaught TypeError: undefined is not a functiontouch-scheduler-all.js:9 (anonymous function)

2. Code is minified, so I can't debug it.
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
pincherhgz
Posts: 78
Joined: Mon Oct 27, 2014 11:40 am

Re: correct way to destroy scheduler

Post by pincherhgz »

we'll send it via mail (as we create all our code with Architect, it is too much for upload)

User avatar
mats
Core Developer
Core Developer
Posts: 16756
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: correct way to destroy scheduler

Post by mats »

Before you do, please clean it up and make sure it renders without any exceptions
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
pincherhgz
Posts: 78
Joined: Mon Oct 27, 2014 11:40 am

Re: correct way to destroy scheduler

Post by pincherhgz »

in the debug version there is no exception, we only have in chrome the warnings (whatever it is, as we assume that is not related to our code)

The key "minimum-ui" is not recognized and ignored. sencha-touch-all-debug.js:13036
The 'overflowchanged' event is deprecated and may be removed. Please do not use it.sencha-touch-all-debug.js:75882

Post Reply