[fxruby-users] Trouble updating image in an icon

fxrbu1 at gi2.herzkes.de fxrbu1 at gi2.herzkes.de
Wed Oct 18 03:23:01 EDT 2006

Ray Bovet wrote:
> Got a click on the image
> testicon.rb:28: [BUG] Segmentation fault


> def displayImage( myViewFile, theApp, theImage)
>     iconFile = File.open( myViewFile, "rb")
>     theImage.icon = FXGIFIcon.new(theApp, iconFile.read)
>     iconFile.close
> end

Invoke method "create" on the new icon before the assignment.

It would be nice if FXRuby detected this (it's a common oversight) and
called "create" on widgets if necessary. Or, raising an exception with
an explanatory message would still be better than crashing the interpreter.


More information about the fxruby-users mailing list