Topic
10 replies Latest Post - ‏2013-01-03T19:16:52Z by SystemAdmin
aram208
aram208
27 Posts
ACCEPTED ANSWER

Pinned topic dojox.mobile.SpinWheelDatePicker

‏2012-11-13T14:54:50Z |
After including the dojox.mobile.SpinWheelDatePicker I am getting "Cannot call method 'getMonth' of null". The only fix I have found so far was to change the body style attribute from

display:none
to

visibility:hide

However, this adds annoying flickering when loading the application cause it renders the whole html page and then hides it.
Is this the only way to make the SpinWheenDatePicker work?
  • Eric Durocher
    Eric Durocher
    38 Posts
    ACCEPTED ANSWER

    Re: dojox.mobile.SpinWheelDatePicker

    ‏2012-11-13T16:33:47Z  in response to aram208
    Hello,

    Yes you are right, this is the correct workaround so far (this should be fixed in next patches).

    About flickering, the correct value is visibility:hidden (not 'hide'), maybe that's the problem?

    Thanks,

    Eric
    • aram208
      aram208
      27 Posts
      ACCEPTED ANSWER

      Re: dojox.mobile.SpinWheelDatePicker

      ‏2012-11-13T17:02:10Z  in response to Eric Durocher
      Thanks Eric,

      The value 'hide' was just a typo. The actual value in the code is 'hidden'.
      When app is launched it shows the calendar and other dojo views for a split second before hiding them which I think this is a tradeoff of using visibility:hidden.

      Aram
      • Eric Durocher
        Eric Durocher
        38 Posts
        ACCEPTED ANSWER

        Re: dojox.mobile.SpinWheelDatePicker

        ‏2012-11-14T07:51:42Z  in response to aram208
        I don't really understand why visibility:hidden would flicker more than display:none, for me both should prevent the page from showing too early...

        During flicker, do you see directly the Dojo widgets (i.e. with Dojo styling), or plain HTML?

        What you can try maybe is to move all the Dojo initialization code (i.e. the require() call) into the wlCommonInit method, although I am not sure it will prevent flickering.

        Thanks,

        Eric
  • aram208
    aram208
    27 Posts
    ACCEPTED ANSWER

    Re: dojox.mobile.SpinWheelDatePicker

    ‏2012-12-14T17:49:26Z  in response to aram208
    Well, after upgrading to 5.0.5 the spinwheeldatepicker is not working any more. Making this work was really a frustrating experience before and this time no workaround helped so far :(
    The error, thrown by the core-web-layer.js is below. Any help is greatly appreciated

    dojo/parser::parse() error
    TypeError
    arguments: Array[2]
    0: "getMonth"
    1: null
    length: 2
    __proto__: Array[0]
    get message: function () { native code }
    get stack: function () { native code }
    set message: function () { native code }
    set stack: function () { native code }
    type: "non_object_property_call"
    __proto__: Error
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: dojox.mobile.SpinWheelDatePicker

    ‏2012-12-14T18:26:42Z  in response to aram208
    Have you upgraded your 5.0.0.3 installation to 5.0.5, or a fresh install?
    There is an identified defect with upgrading existing installations.

    Please try uninstalling 5.0.0.3 and then installing 5.0.5, or a fresh Eclipse with 5.0.5 and see if the problem persists or not.

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • aram208
      aram208
      27 Posts
      ACCEPTED ANSWER

      Re: dojox.mobile.SpinWheelDatePicker

      ‏2012-12-14T19:04:28Z  in response to IdanAdar
      Thanks, will try now. Is Juno supported?
      • aram208
        aram208
        27 Posts
        ACCEPTED ANSWER

        Re: dojox.mobile.SpinWheelDatePicker

        ‏2012-12-14T19:10:05Z  in response to aram208
        .... disregard my previous question regarding Juno (yes, it is supported)
    • aram208
      aram208
      27 Posts
      ACCEPTED ANSWER

      Re: dojox.mobile.SpinWheelDatePicker

      ‏2012-12-14T23:49:12Z  in response to IdanAdar
      So, I created a blank project to ONLY the SpinWheelDatePicker using a fresh install of 5.0.5 on newly downloaded Juno

      No success. Still getting the same error.
  • aram208
    aram208
    27 Posts
    ACCEPTED ANSWER

    Re: dojox.mobile.SpinWheelDatePicker

    ‏2012-12-14T23:51:10Z  in response to aram208
    failed after upgrading to 5.0.5
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: dojox.mobile.SpinWheelDatePicker

      ‏2013-01-03T19:16:52Z  in response to aram208
      After playing around with it for a while, I actually came to the same conclusion as Eric had quite a while ago here:

      http://mail.dojotoolkit.org/pipermail/dojo-interest/2012-October/071399.html

      So I did the following steps on 5.0.5 on Juno. Created a new project/app. Dragged a SpinWheelDatePicker into the scrollable view. Modified build-dojo.xml to include gregorian.js. Modified the html file to change display:none; to visibility:hidden;. Remove dojox/mobile/deviceTheme from dojoInit in the app js file and add the script tag for deviceTheme.js in the html file. Build and deploy and it works.

      I'm opening a defect for the fact that we load deviceTheme using require.