Wx::DateTime:Class
-
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
-
SketchUp doesn't have a date.rb. Where did that come from?
-
@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.
-
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.
-
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.
-
Just moving the file (date.rb) somewhere else won't fix anything.
-
@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.
-
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?
Advertisement