-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NameError: uninitialized constant Swt #9
Comments
Hi Douglas, Could you give me the output of you can just type them into IRB. Cheers, edit: from your JRuby installation of course :-) |
Hi Tobi, On Windows8, x64 architecture: RbConfig::CONFIG["host_os"] is "mswin32" The issue is that some important SWT classes are not accessible: For a button Widget, But for a Canvas widget (same with Group), Swt::Widgets::Canvas.new(my_shell, Swt::SWT::NONE) -> I checked the Vendor jars (swt-win32.jar andswt-win64.jar), path to jars are OK and clsses are in the jars with the proper name ! I spent 2 days now on this one and i need Group and Canvas. Thank you ! François-Xavier. |
When I initially created this gem for Redcar, I didn't import all the SWT classes, only the ones I needed: I think you can get import into Ruby any other class you need like this:
|
Works like a charm... :-) Thank you very much for your quick and accurate reply ! Best, |
No problem :) If you add loads more classes I'll merge a pull request to import them too. |
Okay awesome then I believe we can close this issue and I have some classes to add from the shoes side probably :-) |
I'm on Windows XP 32
Using pik and
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) Client VM 1.7.0_25-b17 [Windows XP-x86]
I can run the sample button.rb which uses the swt lib from the repo.
If I comment out the line $:.unshift(File.expand_path("../../lib", FILE))
and the swt gem is installed in C:\jruby-1.7.4\lib\ruby\gems\shared\gems\swt-0.16
I get that NameError: uninitialized constant Swt
Now that's from my G:\ drive with all my local repos.
If I go to C:\ where jruby is and run jruby -S jirb
This all started when I tried to run shoes4 which depends on swt gem version 0.16
Clearly something is not right for my windows install. Can you help me?
The text was updated successfully, but these errors were encountered: