From lists at ruby-forum.com Fri Apr 1 19:48:42 2011 From: lists at ruby-forum.com (David Beswick) Date: Sat, 02 Apr 2011 01:48:42 +0200 Subject: [wxruby-users] Packaging wxRuby fails In-Reply-To: <4D8D17B8.9010802@gmx.net> References: <4D779EDD.4090806@gmx.net> <4D7C7420.70107@gmx.net> <4D812F97.8020005@gmx.net> <4D81C440.6010909@gmx.net> <4D8903C4.2070903@gmx.net> <4D8A0D5F.7060007@gmx.net> <4D8D17B8.9010802@gmx.net> Message-ID: <8a90b2ce2c6984d059e535c93701729d@ruby-forum.com> Hi Marvin and Mario, I'm coming up against the same issue and have done some investigation too. (I previously sent a message about this to wxruby-developers but I don't think that was the right list. Sorry about that.) I'm not sure that Mario's assessment of it being a wxWidgets issue is right, because on systems that show the problem, the wxWidgets sample apps work fine but wxruby fails. After reading Mario's message I tried to compile wxRuby with the latest development version, but the number of code changes to wxWidgets was too great and I couldn't get it to compile. Mario, do you know of a wxWidgets version that allows wxRuby to work? I have managed to get wxRuby up and running on Ubuntu by modifying pixman. I got this insight by debugging the crash with gdb. In the file pixman/pixman.c, function "lookup_composite_function", I ifdef-ed out the following code: for (i = 0; i < N_CACHED_FAST_PATHS; ++i) { const pixman_fast_path_t *info = &(cache->cache[i].fast_path); /* Note that we check for equality here, not whether * the cached fast path matches. This is to prevent * us from selecting an overly general fast path * when a more specific one would work. */ if (info->op == op && info->src_format == src_format && info->mask_format == mask_format && info->dest_format == dest_format && info->src_flags == src_flags && info->mask_flags == mask_flags && info->dest_flags == dest_flags && info->func) { *out_imp = cache->cache[i].imp; *out_func = cache->cache[i].fast_path.func; goto update_cache; } } And then wxruby works. So it looks like disabling the "fast path caching" feature of pixman fixes the bug. If you want to try it, download the pixman source, modify the file, then compile and install pixman. Rebuild wxWidgets and wxRuby, and then you should have a working wxRuby. I don't know where to go next to get a proper resolution to this problem. As I said, because the wxWidgets sample works, and apps such as the Ubuntu GUI work otherwise with their use of pixman, I'm thinking it must be some particular way that wxRuby interacts with wxWidgets that causes the problem. Can anyone suggest a next step? Thanks, David -- Posted via http://www.ruby-forum.com/. From sutniuq at gmx.net Sat Apr 2 04:13:06 2011 From: sutniuq at gmx.net (Quintus) Date: Sat, 02 Apr 2011 10:13:06 +0200 Subject: [wxruby-users] Packaging wxRuby fails In-Reply-To: <8a90b2ce2c6984d059e535c93701729d@ruby-forum.com> References: <4D779EDD.4090806@gmx.net> <4D7C7420.70107@gmx.net> <4D812F97.8020005@gmx.net> <4D81C440.6010909@gmx.net> <4D8903C4.2070903@gmx.net> <4D8A0D5F.7060007@gmx.net> <4D8D17B8.9010802@gmx.net> <8a90b2ce2c6984d059e535c93701729d@ruby-forum.com> Message-ID: <4D96DA92.3020809@gmx.net> Am 02.04.2011 01:48, schrieb David Beswick: > I don't know where to go next to get a proper resolution to this > problem. As I said, because the wxWidgets sample works, and apps such as > the Ubuntu GUI work otherwise with their use of pixman, I'm thinking it > must be some particular way that wxRuby interacts with wxWidgets that > causes the problem. Can anyone suggest a next step? If it wasn't only wxRuby not working (which is not really related to pixman), I'd file a bug against pixman. What about other wxWidgets bindings, such as e.g. wxpython? Do they face the same problems? If not, maybe the outdated version of SWIG used by wxRuby is in fault (disclaimer: I never used SWIG)? A "proper resultion" however can't be achieved by telling wxRuby users "oh, and you have to patch pixman, recompile it, wxWidgets and wxRuby". If the pixman team doesn't want to reenable their code again, we're kinda stuck. I don't know what to do either, but if I can be of any help... You know. For the moment, I'll just continue learning C++. Vale, Marvin From lists at ruby-forum.com Sat Apr 9 22:00:25 2011 From: lists at ruby-forum.com (David Beswick) Date: Sun, 10 Apr 2011 04:00:25 +0200 Subject: [wxruby-users] Packaging wxRuby fails In-Reply-To: <4D779EDD.4090806@gmx.net> References: <4D779EDD.4090806@gmx.net> Message-ID: <103535ecce64256f7c8307c1fc5ccf1b@ruby-forum.com> I thought I'd start at Ubuntu and reported a bug here: https://bugs.launchpad.net/ubuntu/+source/pixman/+bug/756237 -- Posted via http://www.ruby-forum.com/. From sutniuq at gmx.net Sun Apr 10 03:48:30 2011 From: sutniuq at gmx.net (Quintus) Date: Sun, 10 Apr 2011 09:48:30 +0200 Subject: [wxruby-users] Packaging wxRuby fails In-Reply-To: <103535ecce64256f7c8307c1fc5ccf1b@ruby-forum.com> References: <4D779EDD.4090806@gmx.net> <103535ecce64256f7c8307c1fc5ccf1b@ruby-forum.com> Message-ID: <4DA160CE.30101@gmx.net> Am 10.04.2011 04:00, schrieb David Beswick: > I thought I'd start at Ubuntu and reported a bug here: > > https://bugs.launchpad.net/ubuntu/+source/pixman/+bug/756237 > Thanks, lets see where we get... In your bug report you suggest to install the wxRuby gem for 1.8 rather than that one for 1.9, maybe you can correct this? I posted a comment about it, but I think I can't update the original bug report. Vale, Marvin From lists at ruby-forum.com Mon Apr 11 08:32:24 2011 From: lists at ruby-forum.com (Marija Velickovic) Date: Mon, 11 Apr 2011 14:32:24 +0200 Subject: [wxruby-users] Add values in GridCellChoiceEditor Message-ID: Hi, I'm using GridCellChoiceEditor for some cells in Grid object. At the beginning values inside choice are initialized like in grid.rb example @editor_c = Wx::GridCellChoiceEditor.new(['foo', 'bar', 'baz']) @grid.set_cell_editor(4, 3, @editor_c) After that when script is started this cell is empty and user can select one of values. So this behavior is ok. # While program is running I want to add new values into this choice editor, so I do next in the code: @editor.set_parameters("foo, bar, baz, new") After that nothing happens and choices still have the same old list of values. # I also tried to use local variable for editor instead on instance variable: edit = @grid.get_cell_editor(4,3) edit.set_parameters("foo, bar, baz,new") @grid.set_cell_editor(4,3,edit) Again list is not updated, and 'new' string is not added. # Only way I've found for now to be able to update editor, is to have empty grid (so nothing is selected in choice cells), and then update editor. This is no acceptable for my application, because list of values in choice cells should be updated during the program running few times (depending on some other user actions). # What am I doing wrong? Is it possible to update list of values in choice editor while program is running? Thanks in advance, Marija -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Apr 12 05:01:52 2011 From: lists at ruby-forum.com (Marija Velickovic) Date: Tue, 12 Apr 2011 11:01:52 +0200 Subject: [wxruby-users] Add values in GridCellChoiceEditor In-Reply-To: References: Message-ID: <2f4dc38b46af027f88969fc454e3edea@ruby-forum.com> Hi again, I've found possible solution for this problem in WxPython Wiki pages http://wiki.wxpython.org/GridCellChoiceEditor from this page: "A common question is how to dynamically update the list in a GridCellChoiceEditor. The problem comes from not having direct access to the underlying ComboBox widget in the grid editor. Fortunately the grid editor throws an event that allows us to get to the underlying ComboBox." I convert Python code for Ruby but I have a problem how to get underlying ComboBox from GridCellChoiceEditor If I use Wx::GridEditorCreatedEvent.get_control function (like in Python code - line 249 on wiki page), I get Wx::Control object instead of Wx::ComboBox or Wx::Choice. So question is how to convert Wx::Control object to Wx::ComboBox to be able to dynamically change list of its values. Hope somebody has an answer, Marija -- Posted via http://www.ruby-forum.com/. From dlbeswick at gmail.com Tue Apr 12 06:11:30 2011 From: dlbeswick at gmail.com (David Beswick) Date: Tue, 12 Apr 2011 20:11:30 +1000 Subject: [wxruby-users] Add values in GridCellChoiceEditor In-Reply-To: <2f4dc38b46af027f88969fc454e3edea@ruby-forum.com> References: <2f4dc38b46af027f88969fc454e3edea@ruby-forum.com> Message-ID: Hi Marija, that's strange because Ruby doesn't really have a way to cast between types. Maybe it's a SWIG problem. Could you post a small code sample that shows the issue? On Tue, Apr 12, 2011 at 7:01 PM, Marija Velickovic wrote: > Hi again, > > I've found possible solution for this problem in WxPython Wiki pages > http://wiki.wxpython.org/GridCellChoiceEditor > > from this page: > "A common question is how to dynamically update the list in a > GridCellChoiceEditor. The problem comes from not having direct access to > the underlying ComboBox widget in the grid editor. Fortunately the grid > editor throws an event that allows us to get to the underlying > ComboBox." > > I convert Python code for Ruby but I have a problem how to get > underlying ComboBox from GridCellChoiceEditor > > If I use Wx::GridEditorCreatedEvent.get_control function (like in Python > code - line 249 on wiki page), I get Wx::Control object instead of > Wx::ComboBox or Wx::Choice. > > So question is how to convert Wx::Control object to Wx::ComboBox to be > able to dynamically change list of its values. > > Hope somebody has an answer, > Marija > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlbeswick at gmail.com Tue Apr 12 08:33:19 2011 From: dlbeswick at gmail.com (David Beswick) Date: Tue, 12 Apr 2011 22:33:19 +1000 Subject: [wxruby-users] Packaging wxRuby fails In-Reply-To: <4DA160CE.30101@gmx.net> References: <4D779EDD.4090806@gmx.net> <103535ecce64256f7c8307c1fc5ccf1b@ruby-forum.com> <4DA160CE.30101@gmx.net> Message-ID: Thanks for your help Marvin, I've done that On Sun, Apr 10, 2011 at 5:48 PM, Quintus wrote: > Am 10.04.2011 04:00, schrieb David Beswick: > > I thought I'd start at Ubuntu and reported a bug here: > > > > https://bugs.launchpad.net/ubuntu/+source/pixman/+bug/756237 > > > > Thanks, lets see where we get... > > In your bug report you suggest to install the wxRuby gem for 1.8 rather > than that one for 1.9, maybe you can correct this? I posted a comment > about it, but I think I can't update the original bug report. > > Vale, > Marvin > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From passionate_programmer at hotmail.com Thu Apr 21 14:26:00 2011 From: passionate_programmer at hotmail.com (Rohit Coder) Date: Thu, 21 Apr 2011 23:56:00 +0530 Subject: [wxruby-users] Setup execution is denied on Windows 7 even after turning off UAC Message-ID: I have four partitions on my hard drive, viz., C, E, F and G. Partitions C and G are NTFS whereas E and F are FAT32. I downloaded wxRuby Setup to the partition E. When I tried to execute the Setup, Windows 7 displayed an error: "Unable to execute file in the temporary directory. Setup aborted. Error 5: Access is denied" I tried to execute it as an administrator by right-clicking and selecting "Run as Administrator". It again displays the same error. I brought the slider level of UAC to the lowest level to turn UAC off and restarted the PC, still I am getting the same error. I have created Windows Temp folder in the partition E by changing the Environment Variables. I did this to avoid fragmentation on the partition that contains OS. I have even changed the path of the Windows page (swap) file. I right-clicked this Temp folder to check the rights. I changed the ownership and allowed all rights, still the problem is there. I changed the Windows Temp folder location to Windows default and restarted the machine. I get the same error when I try to execute the Setup. Here please note that I am logging in as an Administrator. It is not a Guest account. How to get rid of this problem? ................ Rohit Khare -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Thu Apr 21 23:25:29 2011 From: lists at ruby-forum.com (Rubist Rohit) Date: Fri, 22 Apr 2011 05:25:29 +0200 Subject: [wxruby-users] Alternate way of installing wxRuby. Message-ID: <8c507ffff9606f9b63289859658ecfb2@ruby-forum.com> I am finding it problematic to install wxRuby on Windows 7 (see my post in this forum titled: "Setup execution fails...."). Is there any alternate way to install wxRuby? -- Posted via http://www.ruby-forum.com/. From sutniuq at gmx.net Fri Apr 22 03:09:36 2011 From: sutniuq at gmx.net (Quintus) Date: Fri, 22 Apr 2011 09:09:36 +0200 Subject: [wxruby-users] Alternate way of installing wxRuby. In-Reply-To: <8c507ffff9606f9b63289859658ecfb2@ruby-forum.com> References: <8c507ffff9606f9b63289859658ecfb2@ruby-forum.com> Message-ID: <4DB129B0.8080503@gmx.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 22.04.2011 05:25, schrieb Rubist Rohit: > I am finding it problematic to install wxRuby on Windows 7 (see my post > in this forum titled: "Setup execution fails...."). Is there any > alternate way to install wxRuby? > Install Ruby the normal way, i.e. use the RubyInstaller at http://rubyinstaller.org (ensure you tick the "Add Ruby to the PATH environment variable checkbox in the installer), then go to your command prompt and type gem install wxruby-ruby19 (assuming you installed Ruby 1.9, which I recommand over 1.8). Vale, Marvin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNsSmrAAoJELh1XLHFkqhamj8H/RrNGnF089IzvToMk39s+rUw t+Di7wldOvGy8B9LdSkk8F47z5izj0tuwEoZEgaeZ6UZ1D7KVtgC9skNdV+UvMzC rY455rNiOgifDavKVt7ZSRGacJddSsR4NqbZ7xNyRC3TqC5DuUjtZbR9Q6BPda3b 3LvjkRonJK1FJ3/Xz1mrQ8xNTqXLB/CBgP8S2krtWKhAssU90RslgM2XkyvwALX9 2kLQPr7HKiOp0cB64fr0/UzWLpDxNZS4GQ0j7nMLT6dlxG7Ubdg13oqDMzZ9FJ/2 rwQHjd75QR8GMBTiHvt3GiybtZXcwmkdTH1VGMgSqUK8v2HccAnDfhmFiULZ0Xw= =TvV+ -----END PGP SIGNATURE----- From lists at ruby-forum.com Tue Apr 26 18:45:54 2011 From: lists at ruby-forum.com (Ilya R.) Date: Wed, 27 Apr 2011 00:45:54 +0200 Subject: [wxruby-users] Creating a child window? Message-ID: How do I create a child window, one that I can use as a separate control window for the parent window. I want to implement controls on desktop one and the parent window on desktop two. This would be for multiple desktop operations. My idea is to use it for a projector AV station. So far I have this: http://pastie.org/1837121 I can't figure out how to make a child. I tried making a new frame, but that was unsuccessful. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Apr 26 19:00:02 2011 From: lists at ruby-forum.com (Ilya Radchenko) Date: Wed, 27 Apr 2011 01:00:02 +0200 Subject: [wxruby-users] wxRuby global hotkeys In-Reply-To: <1eb8ee5f2bfb37f3338b442406c9750f@ruby-forum.com> References: <1eb8ee5f2bfb37f3338b442406c9750f@ruby-forum.com> Message-ID: <10a938a7ae61ea487ea5b0e26effef38@ruby-forum.com> I'm also interested in how this works in wxRuby. This is a feature that i'm looking for, and the documentation isn't exactly great. It would be greatly appreciated if someone could point us in the right direction. Thank you! -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Thu Apr 28 06:54:28 2011 From: alex at pressure.to (Alex Fenton) Date: Thu, 28 Apr 2011 11:54:28 +0100 Subject: [wxruby-users] Creating a child window? In-Reply-To: References: Message-ID: <4DB94764.3040402@pressure.to> On 26/04/2011 23:45, Ilya R. wrote: Pastie seems to be down, but what you suggest sounds possible. > I can't figure out how to make a child. I tried making a new frame, but > that was unsuccessful. Could you post the code that you tried, and any error messages you received? It should be as simple as: child = Frame.new(parent, ...) You then fill the child with widgets as required, in the normal way. a From ann.maybury at gmail.com Sat Apr 30 12:17:35 2011 From: ann.maybury at gmail.com (Ann Maybury) Date: Sat, 30 Apr 2011 09:17:35 -0700 Subject: [wxruby-users] Help with relative address Message-ID: I am using the wiki tutorial to try to learn wxruby. I have programmed the windows interface many times. The first two samples ran fine, but now I am on the icon frame and need a little help. I am aware that I could replace the offending path with a hard coded one, but do not want to do that. I have 50 years programming experience but no experience with ruby or other modern scripting languages. The code found near the bottom of http://wxruby.rubyforge.org/wiki/wiki.pl?Frames_%28Part_1%29 is copied below. My current OS is Windows XP service pack 3 version 2002 AMD processor 2.50 gig of ram. When I run the RubyMine debugger I get the following error. Uncaught exception: Icon file does not exist: ./icons/wxwin.ico If I search my machine I find the file at C:\Ruby192\lib\ruby\gems\1.9.1\gems\wxruby-ruby19-2.0.1-x86-mingw32\samples\bigdemo\icons How do I change the line highlighted in red below so that ruby will find this file? ---------------------------------Code -------------------------------------- require "rubygems" require "wx" ID_ICON = 1000 class IconFrame < Wx::Frame def initialize super(nil, -1, "Changing Icons!", Wx::DEFAULT_POSITION, Wx::Size.new(225,150)) panel = Wx::Panel.new(self, -1) iconNames = ["wxwin", "mondrian", "ogl", "smiley"] icons = Wx::RadioBox.new(panel, ID_ICON, "&Icons", Wx::Point.new(20,5), Wx::DEFAULT_SIZE, iconNames, 1, Wx::RA_SPECIFY_COLS) evt_radiobox(ID_ICON) {|event| on_change_icon(event)} if Wx::PLATFORM == "WXMSW" Wx::Icon.new("./icons/wxwin.ico", Wx::BITMAP_TYPE_ICO) else Wx::Icon.new("./icons/wxwin16x16.xpm", Wx::BITMAP_TYPE_XPM) end show(true) #true is the default value, so it may be left off end def on_change_icon(event) if Wx::RUBY_PLATFORM == "WXMSW" case event.get_int #(get_int is deprecated) when 0 set_icon(Wx::Icon.new("./icons/wxwin.ico")) when 1 set_icon(Wx::Icon.new("./icons/mondrian.ico")) when 2 set_icon(Wx::Icon.new("./icons/ogl.ico")) when 3 set_icon(Wx::Icon.new("./icons/smiley.ico")) end else case event.get_int when 0 set_icon(Wx::Icon.new("./icons/wxwin16x16.xpm")) when 1 set_icon(Wx::Icon.new("./icons/mondrian.xpm")) when 2 set_icon(Wx::Icon.new("./icons/ogl.xpm")) when 3 set_icon(Wx::Icon.new("./icons/smiley.xpm")) end end end end class MinimalApp < Wx::App def on_init IconFrame.new end end MinimalApp.new.main_loop ----------------------end of code------------------------------------------------ -- Ann Maybury ann.maybury at gmail.com -- Ann Maybury ann.maybury at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: