[#83328] tcltklib and not init'ing tk — aakhter@... (Aamer Akhter)

Hello,

13 messages 2003/10/01

[#83391] mixing in class methods — "Mark J. Reed" <markjreed@...>

Okay, probably a dumb question, but: is there any way to define

22 messages 2003/10/01
[#83392] Re: mixing in class methods — Ryan Pavlik <rpav@...> 2003/10/01

On Thu, 2 Oct 2003 06:02:32 +0900

[#83397] Re: mixing in class methods — Gavin Sinclair <gsinclair@...> 2003/10/01

On Thursday, October 2, 2003, 7:08:00 AM, Ryan wrote:

[#83399] Re: mixing in class methods — "Mark J. Reed" <markjreed@...> 2003/10/02

On Thu, Oct 02, 2003 at 07:37:25AM +0900, Gavin Sinclair wrote:

[#83404] Re: mixing in class methods — "Gavin Sinclair" <gsinclair@...> 2003/10/02

> On Thu, Oct 02, 2003 at 07:37:25AM +0900, Gavin Sinclair wrote:

[#83416] C or C++? — "Joe Cheng" <code@...>

I'd like to start writing Ruby extensions. Does it make a difference

32 messages 2003/10/02
[#83435] Re: C or C++? — "Aleksei Guzev" <aleksei.guzev@...> 2003/10/02

[#83448] xml in Ruby — paul vudmaska <paul_vudmaska@...> 2003/10/02

The biggest problem i have with Ruby is the sleepness

[#83455] Re: xml in Ruby — Chad Fowler <chad@...> 2003/10/02

On Thu, 2 Oct 2003, paul vudmaska wrote:

[#83464] Re: xml in Ruby or no xml it's just a question — paul vudmaska <paul_vudmaska@...> 2003/10/02

>>--------

[#83470] Re: xml in Ruby — paul vudmaska <paul_vudmaska@...>

>>>

15 messages 2003/10/02

[#83551] xml + ruby — paul vudmaska <paul_vudmaska@...>

>>---------

20 messages 2003/10/03
[#83562] Re: xml + ruby — Austin Ziegler <austin@...> 2003/10/03

On Fri, 3 Oct 2003 16:11:46 +0900, paul vudmaska wrote:

[#83554] hash of hashes — Paul Argentoff <argentoff@...>

Hi all.

18 messages 2003/10/03

[#83675] fox-tool - interactive gui builder for fxruby — henon <user@...>

hi fellows,

15 messages 2003/10/05

[#83730] Re: Enumerable#inject is surprising me... — "Weirich, James" <James.Weirich@...>

> Does it surprise you?

17 messages 2003/10/06
[#83732] Re: Enumerable#inject is surprising me... — nobu.nokada@... 2003/10/07

Hi,

[#83801] Extension Language for a Text Editor — Nikolai Weibull <ruby-talk@...>

OK. So I'm going to write a text editor for my masters' thesis. The

35 messages 2003/10/08
[#83803] Re: Extension Language for a Text Editor — Ryan Pavlik <rpav@...> 2003/10/08

On Thu, 9 Oct 2003 05:06:32 +0900

[#83806] Re: Extension Language for a Text Editor — Nikolai Weibull <ruby-talk@...> 2003/10/08

* Ryan Pavlik <rpav@mephle.com> [Oct, 08 2003 22:30]:

[#83812] Re: Extension Language for a Text Editor — Ryan Pavlik <rpav@...> 2003/10/08

On Thu, 9 Oct 2003 06:09:29 +0900

[#83955] Re: Extension Language for a Text Editor — Nikolai Weibull <ruby-talk@...> 2003/10/09

* Ryan Pavlik <rpav@mephle.com> [Oct, 09 2003 09:10]:

[#84169] General Ruby Programming questions — Simon Kitching <simon@...>

21 messages 2003/10/15
[#84170] Re: General Ruby Programming questions — Florian Gross <flgr@...> 2003/10/15

Simon Kitching wrote:

[#84172] Re: General Ruby Programming questions — Simon Kitching <simon@...> 2003/10/15

Hi Florian..

[#84331] Re: Email Harvesting — Greg Vaughn <gvaughn@...>

Ryan Dlugosz said:

17 messages 2003/10/21
[#84335] Re: Email Harvesting — Hugh Sasse Staff Elec Eng <hgs@...> 2003/10/21

On Wed, 22 Oct 2003, Greg Vaughn wrote:

[#84343] Re: Email Harvesting — Ruben Vandeginste <Ruben.Vandeginste@...> 2003/10/22

On Wed, 22 Oct 2003 08:35:32 +0900, Hugh Sasse Staff Elec Eng

[#84341] Ruby-oriented Linux distro? — Hal Fulton <hal9000@...>

There's been some talk of something like this in the past.

15 messages 2003/10/22
[#84348] Re: Ruby-oriented Linux distro? — Gavin Sinclair <gsinclair@...> 2003/10/22

On Wednesday, October 22, 2003, 6:01:16 PM, Hal wrote:

[#84351] Re: Ruby-oriented Linux distro? — Andrew Walrond <andrew@...> 2003/10/22

On Wednesday 22 Oct 2003 11:02 am, Gavin Sinclair wrote:

[#84420] Struggling with variable arguments to block — "Gavin Sinclair" <gsinclair@...>

Hi -talk,

18 messages 2003/10/24
[#84428] Re: Struggling with variable arguments to block — matz@... (Yukihiro Matsumoto) 2003/10/24

Hi,

[#84604] ruby-dev summary 21637-21729 — Takaaki Tateishi <ttate@...>

Hello,

21 messages 2003/10/30
[#84787] Re: ruby-dev summary 21637-21729 — Paul Brannan <pbrannan@...> 2003/11/06

On Fri, Oct 31, 2003 at 07:01:28AM +0900, Takaaki Tateishi wrote:

[#84789] Re: ruby-dev summary 21637-21729 — matz@... (Yukihiro Matsumoto) 2003/11/06

Hi,

[#84792] Re: ruby-dev summary 21637-21729 — Paul Brannan <pbrannan@...> 2003/11/06

On Thu, Nov 06, 2003 at 11:17:59PM +0900, Yukihiro Matsumoto wrote:

[#84794] Re: ruby-dev summary 21637-21729 — matz@... (Yukihiro Matsumoto) 2003/11/06

Hi,

Re: [Q] Ruby and XUL?

From: "Michael C. Libby" <m_libby@...>
Date: 2003-10-31 15:15:47 UTC
List: ruby-talk #84622
On Wednesday 29 October 2003 02:56, Pablo Lorenzzoni wrote:
> Em Qua, 29 Out 2003, Daniel Carrera escreveu:
> | I was just wondering what it would take to be able to use Ruby for the
> | programming logic.  I guess that one way is to convince the Mozilla
> | project to ship Ruby with Mozilla.  But I wouldn't count on that.

> (1) Either we want Mozilla to use Ruby to draw their GUI - and I think
> they'd never do that since JavaScript is the "de facto" language for
> client-side applications

Fascinating discussion. Sorry I'm joining a little late, but I've actually 
been working on a project along these lines and hadn't even noticed this 
thread until today.

That project is totally unprepared for public review at this time, so what 
better time to put out a 0.01 release? See 
http://www.andsoforth.com/ruby/index.html and look for the "Artemis" 
project. (Please note: extremely rough, incomplete code!)

Right now the XML I'm using mostly describes the menubar, menus, and menu 
items. Also note that I actually use a two step approach that turns the 
XML into some Ruby hashes. The GUI is actually drawn using information 
from the hashes. Probably a sub-optimal solution. When I originally 
started my goal was to avoid writing GUI code by hand, and I just stored 
my menu info in Ruby structures. So there may be a refactoring that's 
needed.

> (2) Or we want to use XUL's scheme in our Ruby programs - which can be
> more interesting... writing our GUIs using XML is, surely, much easier
> than the traditional method. The problem is that Ruby doesn't have a
> "standard" Graphical Toolkit...

I agree that this is far more interesting than trying to render XUL in a 
Gecko object and linking back to Ruby scripting.

Ruby does have a standard GUI toolkit, I think: Tk. For better or worse it 
has been included in the stable tarball for at least a couple of years. It 
has been in the Windows Installer from the PP also as long as I can 
recall. When you install Ruby from source, if it finds a suitable Tk 
library on your system it will build Tk support by default.

However, Tk is hardly the best toolkit available. I don't know what you or 
anyone else think that would be. For my own purposes, I prefer GTK2 at 
this point. The core libraries are all coded in C and Masao Mutoh and the 
other Ruby-GNOME2 hackers have done an impressive job of getting Ruby 
bindings and the all-important API documentation going.

> So, "our XUL" either have to be bound to
> some existing Toolkit and act as "yet another layer" for the GUI
> programming, or (which I think is more interesting) act as an agnostic
> layer, working with just any Toolkit.

I will be researching XUL today and for the next few days I guess (no need 
for me to reinvent this wheel a third or fourth time). The GNOME project 
already has a complete XML solution that is very similar provided by 
libglade (as has been noted). Problem is that to get libglade XML you 
really want to use GLADE, which is not really set up to support a Ruby 
program (except for generating the GUI description in XML).

But that's not really a big deal. What I find less exciting about 
GLADE/libglade is that the XML is big and ugly compared to the amount of 
information contained therein (for instance, Mutoh's simple editor example 
at ruby-GNOME2: the XML for his GUI is 824 lines long, but only describes 
one small application with three menus, ~20 menu items, one toolbar, a 
text buffer, and a status bar-- his Ruby script to support the GUI is only 
279 lines long and includes some very nice undo/redo and find/replace 
functionality). I want an XML/GUI language that I can read and write 
without a tool like GLADE. I certainly don't want to wade through 800+ 
lines of XML to edit a very small application.

And maybe I'm just too impatient with libglade. XML is easy in Ruby now 
that you have REXML installed by default-- and making a GUI from an XML 
description is the perfect use of the pull processor, imho.

> | But over-all, I think I like the idea of using XML for the GUI
> | structure and a programming language for the behaviour.  This strikes
> | me as a good combination (but then again, I am not a very experienced
> | programmer).

I'm not a very experienced programmer either, but it would seem that some 
very experienced programmers agree with this idea of using XML to describe 
a GUI. The XUL project, XAML, and libglade all take that approach.

> The idea is not new. I think Glade, for the Gtk, can save it's
> structures in an XML format to be loaded inside the program. If we could
> imagine an "agnostic" Glade that outputs XML in the XUL format, and make
> it work with any toolkit Ruby support... that sounds as a good idea.

Personally I think you'd have a lot of work to do (and programming in C, no 
less) to get GLADE to support a different widget set than what is has for 
GNOME. But don't let that stop you! :)

But GLADE is just one piece. The XML is theoretically independent of the 
tool. XUL looks easy enough to write by hand.

And no one has mentioned it yet, but why not write the GUI description 
document(s) in YAML? :)

(for the record I tried YAML->GTK2 with Artemis, but found YAML more 
difficult than XML for this-- probably my lack of experience with YAML is 
to blame)

 -michael

________________________________________________
 Michael C. Libby        m_libby@andsoforth.com

      see my photos and Ruby programs at:
             www.andsoforth.com


In This Thread