Ruby Developer's Guide

Frequently Asked Questions

The following Frequently Asked Questions, answered by the authors of this book, are designed to both measure your understanding of the concepts presented in this chapter and to assist you with real-life implementation of these concepts. To have your questions about this chapter answered by the author, browse to www.syngress.com/solutions and click on the "Ask the Author" form.

Q:

Are any of the GUI toolkits for Ruby thread-safe?

Q:

Ruby/GTK and FXRuby come with some good example programs but I didn't find much for Ruby/Tk. What's a good source for additional Ruby/Tk example programs?

Q:

I built and installed FOX, and then built and installed FXRuby, and both appeared to build without errors. When I try to run any of the FXRuby example programs under Linux, Ruby responds with an error message that begins "LoadError: libFOX.so: cannot open shared object file". I checked the FOX installation directory and confirmed that libFOX.so is indeed present, so why does Ruby report this error?

Answers

Q:

The answer depends very much on your definition of "thread-safe." In the most general sense, none of the GUI toolkits we've looked at are thread-safe; that is to say, the GUI objects' instance methods don't provide proper support for reentrancy. A good practice for multithreaded GUI applications is to let the GUI operate in the main thread and reserve non-GUI "worker" threads for background tasks whenever possible.

Q:

Check the Ruby Application Archives for the latest version...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Integrated Development Environment (IDE)
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.