• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

Wx::DateTime:Class

Scheduled Pinned Locked Moved Developers' Forum
8 Posts 3 Posters 605 Views
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.
  • A Offline
    Al Hart
    last edited by 9 Sept 2008, 15:02

    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.com/images/e/ef/Render_plus_colored30x30%29.PNG
    IRender nXt from Render Plus

    1 Reply Last reply Reply Quote 0
    • T Offline
      todd burch
      last edited by 9 Sept 2008, 15:53

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

      1 Reply Last reply Reply Quote 0
      • A Offline
        Al Hart
        last edited by 9 Sept 2008, 18:26

        @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.com/images/e/ef/Render_plus_colored30x30%29.PNG
        IRender nXt from Render Plus

        1 Reply Last reply Reply Quote 0
        • T Offline
          todd burch
          last edited by 9 Sept 2008, 19:33

          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
          • A Offline
            Al Hart
            last edited by 9 Sept 2008, 20:00

            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.com/images/e/ef/Render_plus_colored30x30%29.PNG
            IRender nXt from Render Plus

            1 Reply Last reply Reply Quote 0
            • T Offline
              todd burch
              last edited by 9 Sept 2008, 20:52

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

              1 Reply Last reply Reply Quote 0
              • A Offline
                Al Hart
                last edited by 9 Sept 2008, 21:07

                @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.com/images/e/ef/Render_plus_colored30x30%29.PNG
                IRender nXt from Render Plus

                1 Reply Last reply Reply Quote 0
                • H Offline
                  herodes
                  last edited by 10 Sept 2008, 17:26

                  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
                  1 / 1
                  • First post
                    1/8
                    Last post
                  Buy SketchPlus
                  Buy SUbD
                  Buy WrapR
                  Buy eBook
                  Buy Modelur
                  Buy Vertex Tools
                  Buy SketchCuisine
                  Buy FormFonts

                  Advertisement