From: Hidetoshi NAGAI Date: 2006-04-06T12:46:54+09:00 Subject: Re: is GUI a weak point? From: "Chris Alfeld" Subject: Re: is GUI a weak point? Date: Thu, 6 Apr 2006 03:58:04 +0900 Message-ID: > Java does have things it does well. Also, very importantly, it > generated a lot of thought and activity in cross platform languages > and GUI toolkits. Tk has strengths and weaknesses too. Maybe, in near future, Ruby/Tk applications will be able to be exported to the Net. I'm working on Ruby/TkORCA (Ruby/Tk on RFB canvas) which is a framework to do that (see [ruby-talk:160371]). One of the documents about that is . It is written in Japanese. But some figures on it may help you to understand its concept. The running demo on the site described in [ruby-talk:160371] is still based on very old version of sources. Current version on my environment for development can resize windows of a daughter which is a sandbox to destribute an application (the application is quite same as the one running on the local windowing system). If you want to deny a daughter to call some methods (e.g. 'load' method), you can do it by calling "TkORCA::MethodWrapper.deny_daughter_to_function('load')" on the mother which is a observer/controller of daughters. You can do also for class/module or instance methods by similar ways. If you want to control a method-call instead of denying, you can do that, for example, -------------------------------------------------------------- TkORCA::MethodWrapper.wrap_function('load'){|orig_m, *args| file, wrap = args unless TkORCA.is_mother? { # check the file path } orig_m.call(file, wrap) } -------------------------------------------------------------- Of course, daughters cannot call such methods for definition. Well, why should be Ruby/Tk? The reason is "(Only?) Ruby/Tk has nessesary functions to implement such features". To implement a mother and daughters, a process must have some independent widget sets. One is widgets for implementing a kind of window-manager (for a mother), and each of others is widgets for each daughter. For security reason, even if a daughter succeeds to get a widget object belongs to the window-manager, the framework is required to disallow the daugher to control the widget. And the framework must be able to decide to create a widget for which widget set depend on the context of the script, bacause the framework must load a GUI script (of course, it is a standalone script which can run on the local) into a daughter. Ruby/Tk can do them. -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)