Hi, I''m trying to update a program from FXRuby 1.0 to FXRuby 1.2 and I''m running into problems with FXImage. Here''s what worked before: buffer = FXImage.new(getApp, "\0" * buffer_size, 0, buffer_width,buffer_height) buffer.create And now I get this: ''wrong argument type String (expected Array) (TypeError)'' So I tried changing "\0" to [0] and then I get a segfault on buffer.create. The image.rb sample also gives me the TypeError message. This is on Win2k by the way. Any help is appreciated...I can''t find much in the documentation or the 1.2 conversion guide. If image.rb is working for others, perhaps something got screwed up when I upgraded? Thanks for any help, Oliver
On Feb 1, 2005, at 8:56 PM, Oliver Smith wrote:> I''m trying to update a program from FXRuby 1.0 to FXRuby 1.2 and I''m > running into problems with FXImage. Here''s what worked before: > > buffer = FXImage.new(getApp, "\0" * buffer_size, 0, > buffer_width,buffer_height) > > buffer.create > > And now I get this: > > ''wrong argument type String (expected Array) (TypeError)'' > > So I tried changing "\0" to [0] and then I get a segfault on > buffer.create. The image.rb sample also gives me the TypeError > message.OK, I see the bug. This is being fixed for version 1.2.4.
Still on the long conversion process to Fox 1.2... :) I got my menus moved to the new FXMenuCheck class and noticed that the ''checked?'' instance method no longer seems to exist. So I switched over to ''getCheck'', which works, except my observed behavior is that it returns true when the menu is NOT checked, and vice versa. It was easy to solve with this: class FXMenuCheck def checked? return !getCheck end end Thanks, Oliver Smith
On Mar 23, 2005, at 11:32 PM, Oliver Smith wrote:> Still on the long conversion process to Fox 1.2... :) I got my menus > moved > to the new FXMenuCheck class and noticed that the ''checked?'' instance > method > no longer seems to exist. So I switched over to ''getCheck'', which > works, > except my observed behavior is that it returns true when the menu is > NOT > checked, and vice versa. It was easy to solve with this: > > class FXMenuCheck > def checked? > return !getCheck > end > endThanks, Oliver! I''ve added this to the bug list and will try to get it fixed for the next release.