sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    šŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Wx::DateTime:Class

    Scheduled Pinned Locked Moved Developers' Forum
    8 Posts 3 Posters 657 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Al HartA Offline
      Al Hart
      last edited by

      I have a client who is getting this error:

      undefined method `now' for Wx::DateTime:Class

      for the statement DateTime.now

      When I type in an illegal function for DateTime (e.g. DateTime.xxx) I get this error

      Error: #<NoMethodError: (eval):196: undefined method `xxx' for DateTime:Class>

      With no mention of WX. I suspect the client may have another ruby script which is defining its own DateTime class.

      I see that the Wx::DateTime class does exist for ruby.

      Is anyone using it?

      Has anyone heard of it?

      Can anyone think of how I can force my .rb files to use the DateTime defined in SketchUp's date.rb?

      Google SketchUp 6\Tools\date.rb(1092):class DateTime < Date

      Al Hart

      http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
      IRender nXt from Render Plus

      1 Reply Last reply Reply Quote 0
      • T Offline
        todd burch
        last edited by

        SketchUp doesn't have a date.rb. Where did that come from?

        1 Reply Last reply Reply Quote 0
        • Al HartA Offline
          Al Hart
          last edited by

          @unknownuser said:

          SketchUp doesn't have a date.rb. Where did that come from?

          AHA - that's part of the mystery. We are installing date.rb from ruby 1.8.5 ourselves.
          (We install several base ruby things such as Win32API.so and date)

          Still - I would like to know which plugins are installing the Fx::DateTime.

          Al Hart

          http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
          IRender nXt from Render Plus

          1 Reply Last reply Reply Quote 0
          • T Offline
            todd burch
            last edited by

            I would encourage you to NOT use the /Tools folder. Using the /Tools folder will cause grief and heartache when your users go to upgrade from SUV6 to a subsequent version. I promise.

            Let Google have the /Tools folder and we can all play nicely in the /Plugins folder. Perhaps you could implement an /RP folder with all your stuff under /Plugins, to isolate potentially common names like 'date.rb' from conflicting with others.

            For your user's issue, I would suggest getting a list of all the loaded scripts and their classes and methods. Sounds like an obvious case of a method being overridden.

            I suspect if you create yourself a module and make your date.rb a mixin in it, you'll be fine.

            1 Reply Last reply Reply Quote 0
            • Al HartA Offline
              Al Hart
              last edited by

              Thanks Todd,

              I'm also trying to get the user to type in:

              ::DateTime.now to see if that causes it to use DateTime rather than Fx::DateTime

              I'll try putting date.rb somewhere else and see if I can get it to work.

              Al Hart

              http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
              IRender nXt from Render Plus

              1 Reply Last reply Reply Quote 0
              • T Offline
                todd burch
                last edited by

                Just moving the file (date.rb) somewhere else won't fix anything.

                1 Reply Last reply Reply Quote 0
                • Al HartA Offline
                  Al Hart
                  last edited by

                  @unknownuser said:

                  Just moving the file (date.rb) somewhere else won't fix anything.

                  No, It will only help next time when I find it in Tools and think it is part of SketchUp rather than a file installed by Render Plus.

                  Al Hart

                  http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                  IRender nXt from Render Plus

                  1 Reply Last reply Reply Quote 0
                  • H Offline
                    herodes
                    last edited by

                    WX probably refers to the WxWidgets namespace. A GUI Toolkit like FoxGUI.
                    I can't really see anything. What type of computer is the client running on?

                    %(#BFBFBF)[http://arhitektonas.blogspot.com
                    I know me,... I am that guy...
                    ]

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post
                    Buy SketchPlus
                    Buy SUbD
                    Buy WrapR
                    Buy eBook
                    Buy Modelur
                    Buy Vertex Tools
                    Buy SketchCuisine
                    Buy FormFonts

                    Advertisement