[Fxruby-users] Re: A couple of questions
Status: Inactive
Brought to you by:
lyle
|
From: <kel...@so...> - 2003-08-22 19:40:00
|
Lyle Johnson writes:
> kel...@so... wrote:
>
>> 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
Yup! I've added the line "icon.create if !icon.created?" before I set the
icon and it now works as expected. Thanks Lyle!
Karl.
|