Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SGWT and DHTMLX Scheduler- exception with Date.setHours

    I am attempting to integrate dhtmlx scheduler into our smartgwt project and I am having issues. I am wondering if the isomorphic api does something with the js date api that is causing there code to choke on Date.setHours? I tried to attach the external js file in question but it turns out it exceeds your file upload limits. A gnu version can be freely downloaded, or I could email to you if given an email addy. Any help would be greatly appreciated.

    SmartClient Version: v9.0p_2013-10-09/EVAL Deployment (expires 2013.12.08_09.17.19) Licensed to: Isomorphic Software (#ISC_EVAL_NIGHTLY)

    Browser: Firefox 24

    Stack trace:
    06:15:55.745:INFO:Log:initialized
    06:15:56.293:TMR0[E]:WARN:Log:(TypeError)
    stack: scheduler.date.date_part@http://192.168.0.8:8080/gsui/js/dhtmlx-scheduler/dhtmlxscheduler.js:1557
    scheduler.date.day_start@http://192.168.0.8:8080/gsui/js/dhtmlx-scheduler/dhtmlxscheduler.js:1577
    @http://192.168.0.8:8080/gsui/js/dhtmlx-scheduler/ext/dhtmlxscheduler_timeline.js:380
    scheduler._temp_matrix_scope/scheduler._renderMatrix@http://192.168.0.8:8080/gsui/js/dhtmlx-scheduler/ext/dhtmlxscheduler_timeline.js:509
    @http://192.168.0.8:8080/gsui/js/dhtmlx-scheduler/ext/dhtmlxscheduler_timeline.js:396
    scheduler.updateView@http://192.168.0.8:8080/gsui/js/dhtmlx-scheduler/dhtmlxscheduler.js:1332
    scheduler.setCurrentView@http://192.168.0.8:8080/gsui/js/dhtmlx-scheduler/dhtmlxscheduler.js:1336
    scheduler.init@http://192.168.0.8:8080/gsui/js/dhtmlx-scheduler/dhtmlxscheduler.js:971
    peb@http://192.168.0.8:8080/gsui/gsui/38AD9747C69148BA1AAB0D2E6E608969.cache.html:294
    jdb@http://192.168.0.8:8080/gsui/gsui/38AD9747C69148BA1AAB0D2E6E608969.cache.html:1603
    sP@http://192.168.0.8:8080/gsui/gsui/38AD9747C69148BA1AAB0D2E6E608969.cache.html:1597
    eP/d.onDraw@http://192.168.0.8:8080/gsui/gsui/38AD9747C69148BA1AAB0D2E6E608969.cache.html:1597
    isc_Canvas_draw@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Core.js:1575
    isc_Layout_layoutChildren@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Foundation.js:325
    isc_Layout_drawChildren@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Foundation.js:247
    isc_Canvas_draw@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Core.js:1566
    isc_Layout_layoutChildren@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Foundation.js:325
    isc_Layout_drawChildren@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Foundation.js:247
    isc_Canvas_draw@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Core.js:1566
    isc_Layout_layoutChildren@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Foundation.js:325
    isc_Layout_drawChildren@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Foundation.js:247
    isc_Canvas_draw@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Core.js:1566
    isc_Layout_layoutChildren@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Foundation.js:325
    isc_Layout_drawChildren@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Foundation.js:247
    isc_Canvas_draw@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Core.js:1566
    isc_Layout_layoutChildren@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Foundation.js:328
    isc_c_Class_invokeSuper@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Core.js:264
    isc_Window_layoutChildren@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Containers.js:92
    isc_Layout_drawChildren@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Foundation.js:247
    isc_Canvas_draw@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Core.js:1566
    isc_c_Class_invokeSuper@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Core.js:264
    isc_Window_draw@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Containers.js:69
    isc_Layout_layoutChildren@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Foundation.js:328
    isc_Layout_drawChildren@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Foundation.js:247
    isc_Canvas_draw@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Core.js:1566
    isc_Layout_layoutChildren@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Foundation.js:328
    isc_Layout_reflowNow@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Foundation.js:339
    isc_Layout_reflow/<@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Foundation.js:339
    isc_c_EventHandler_runTeas@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Core.js:1292
    isc_c_EventHandler__clearThread@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Core.js:1291
    isc_c_Timer__fireTimeout@http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Core.js:1019
    @http://192.168.0.8:8080/gsui/gsui/sc/modules/ISC_Core.js:1015

    fileName: http://192.168.0.8:8080/gsui/js/dhtmlx-scheduler/dhtmlxscheduler.js
    lineNumber: 1557
    columnNumber: 4: a.setHours is not a function
    06:15:56.395:INFO:Log:isc.Page is loaded

    #2
    We don't do anything to setHours(), and we don't override any functions provided by the browser, but we do extend Date.prototype with additional functions and perhaps we have a naming collision.

    You can look at the DHTMLx code (or inspect Date.prototype in a live page) and compare to SmartGWT's Date.js (or again Date.prototype in a live page) to look for collisions.

    However, what is also possible and may be more likely is that you are passing Date instances from GWT Java through JSNI to DHTMLx and something is going wrong with this process. Specifically, Date instances created in GWT are from another frame and if passed in the default way, will not have any functions from Date.prototype that DHTMLx may have installed and expects to be there.

    Big picture, there are tip-of-the-iceberg issues - integrating a third-party JavaScript component into a GWT application *combined with* integrating it into SmartClient/SmartGWT is a complicated task, and requirements such as accessibility (if you need this) cannot realistically be met. Have you considered Feature Sponsorship as another approach - just have whatever features you need added? We just introduced calendar.showDayLanes, similar to DHTMLx "Multi-Resource View" in 4.1 along with some large performance gains, and another organization is sponsoring a bunch of Timeline and Calendar enhancements for 5.0 that may line up with your needs.

    Comment

    Working...
    X