Gtk-Demo - images.rb

Hey All,

I found the problem with the GTK-Demo program for
the progressive image loading. It’s really a simple fix:

Line 157 Reads: @image_stream =,‘r’)
Line 157
Should Be: @image_stream =,‘rb’)

This change
allows the image to be opened in binary format. Should explictly
state that, instead of relying on the ‘r’ mode, no matter the
platform. Once you add the binary flag to the File#open, everything
works as it should, and it runs just fine.

per S. Weinmann’s suggestion, I’ll be creating a couple of libraries
to Package Glade files into a ZIP file, and allow Loading from it.
Also, in conjunction with it, I’ll be creating a new GUI Wrapper around
Glade files for Ruby Apps. Among them, will be the ability to
package Image files into the ZIP File, and load them directly from the
file, as well as a cleaner way to package the signal_connect’s, by
into the method_missing function as a way to get signal_connect’s
done, without having to fully define it.

Mario S.

This SF.Net email is sponsored by xPML, a groundbreaking scripting
that extends applications into web and mobile media. Attend the live
and join the prime developer group breaking into this new coding

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs