Re: [Fxruby-users] A couple of questions
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <jl...@cf...> - 2003-08-22 17:38:14
|
kel...@so... wrote: > I have a couple of questions: > 1) When I use PLACEMENT_MAXIMIZED (e.g., WT_MainWindow.new.show > PLACEMENT_MAXIMIZED) the window hides the Windows task bar and the > application's title bar is not fully visible. Is this normal? (Note > that this isn't what happens when you click on the maximize button in > the top right of the app's control box). Will check this in awhile when I can get back to a Windows box... > 2) I'm not sure if this is a bug, but ... I've subclassed FXIconItem > (so I can do sorting). If I want to create a new item, I can say > MySubClassedFXIconItem.new("string", myBigIcon, myMiniIcon, myObject). > The constructor for MySubClassedFXIconItem should be: > def initialize(string, bigIcon, miniIcon, object) > super(string, bigIcon, miniIcon, object) > end > but that gives a TypeError ("wrong argument type ... expected Data") > However, this works: > def initialize(string, bigIcon, miniIcon, object) > super(string, bigIcon, miniIcon) > self.data = object > end > so it's not a big deal. But I think the first way is more elegant and > so I'm mentioning it. This is definitely a bug, and I will add it to the list. Thanks very much for reporting this. > 3) I'm a using a "downArrow" and "upArrow" icon to show the header > that's being sorted in my FXIconList. I create the icons (hold a > reference in an instance variable: ie, @upArrowIcon = > FXICOIcon.new(myApp, File.open("uparrow.ico", "rb").read())) but I don't > use them until a user clicks on the header. But when I try to set the > icon, I get > abnormal program termination > WT_App.rb:22: [BUG] Segmentation fault > ruby 1.8.0 (2003-08-04) [i386-mswin32] > However, if I create the icons and attach them to, say, a menu item, I > can now use them when the user clicks on a header (without changing > anything else). Is this a GC issue? Or is it that I'm doing something > wrong? You probably need to call create() on those icons first. Please see this question from the FAQ: http://fox-toolkit.org/faq.html#ILLEGALICON Hope this helps, Lyle |