[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:02204] Re: Ruby/Glade usage questions.

From: mrilu <mrilu@...>
Date: 2000-03-28 02:19:13 UTC
List: ruby-talk #2204
> From: schneik@us.ibm.com
> Subject: [ruby-talk:02178] Re: Ruby/Glade usage questions.
> Date: Mon, 27 Mar 2000 00:37:41 -0600
>
> > Would it be much work to make it at least plug in "ruby" instead of 
> > "c" or
> > "perl" into the language field when generating the XML project file?
> 
> > (1) A full glade2rb would be nice to have so that you would not have
> > to reprocess the XML file every time you run some application,
> > especially if you have a large GUI, and you would like it to start up
> > quickly. It would help make applications more self-contained. (While
> > you could always internalize the XML files as a here-document, this is
> > troublesome to update.)
> 
> I understand that.  However, Ruby also process .rb file(s) every time
> you run your script.  And other modern script interrupters do the same
> thing.  That's why I used the word 'script languages'.

I think Python can marshal arbitratry construct to the disk. So is it
possible to make this kind of pickling possible for Ruby too? I think
loading ready datastructure on dedicated C-extension would be the fastest
thing to do (instead of XML parsing, or Ruby parsing).

But all ways have their good and bad sides, so I think all should be
implemented, if not even allowing variations (at least for glade2rb part).
At least Ruby should provide ways to implement these.

I haven't worked with Ruby/Gtk yet that I could have any good
opinion on how to create .rb-files, but I can pretend to have some idea
here :). How about making one additional XML-file giving the structure for
source files. I don't know what's needed, but something like:

<module fname="everything.rb">
  <class ref="AboutWindow"/>
  <whatever is="needed"/>
</module>

And then creating few initializers creating some XML to edit by hand: 
- glade2onemodule, loads glade xml and creates one module with 
  everything included
- glade2classperfile, ditto but creates one file for every class

> time to add 'dump' feature to ruby? ;P

Do you mean dump the process to disk or dump some part of the contents of
the process (effectively some structure holding GUI-objects)?

> note: I'm not saying I will not code glade2rb.  I also think it will
> help start up time. (haven't take any benchmark, though.)

I see that, no problem. I appreciate your work already!

In This Thread

Prev Next