-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm responding to multiple emails on this thread here, to keep the volume 
down.

Je Merkredo 16 Majo 2001 07:10, Lyle skribis:
> development, this statement is especially interesting to me. The first big
> push was to just get everything covered, i.e. provide access to all of

Yeah, and this is a reasonable approach to providing support for an existing 
toolkit.  Another approach is to decide how you want the API to look in Ruby 
and to write the framework first, and then fill in the framework with the 
hooks.  I prefer the second approach, because I think one tends to get a more 
pure API in the end.  It isn't as immediately gratifying, though :-)

> but with the new aliases you can simplify it to:
>
>     myButton.text += " (modified)"

Or myButton.text << " (modified)".  Yes, this is a Good Thing.  The thing 
that concerns me most is how GUIs are described in Ruby code, so that they 
are maximally readable.  As I've said before, I don't know what the best 
design is, and I'd like to hear what everybody's favorite GUI API has been 
(past or present) for readability, maintainability, and simplicity.  Take the 
Java AWT GridBagLayout, for example; this thing was a beast to use; it was/is 
the most powerful layout manager in AWT, and yet is almost useless because it 
is difficult to set up, and GUIs that use it require a lot of work to modify.

> They are functionally the same, but I think in many cases the latter form
> is more natural.

Definately.

> Some of the other areas I'm considering now are allowing the user to
> provide code blocks as message handler functions, and providing
> iterator-like functions on "list-like" classes. I'm open to other
> suggestions about how to make the FXRuby API more "Ruby-esque".

Actually, this should be mandatory.  Any API for Ruby should allow something 
like:

	b = Button.new("Ok") { some_function_or_code }

This is one thing TK got right, and it is the mechanism Swing uses, albeit 
through "Listeners", which are cumbersome.


Antauxe, Ben skribis:

> >    http://www.rubygarden.org/ruby?AbstractionLayer
> >
> >looks like the beginning of the thread but I don't remember where it went
> >from there ;)
>
> The main place it went was that I pointed out that what I
> really want from a GUI toolkit is to have a pluggable front
> end on it, with at least one of the front ends being easily
> driven from a scriptable interface.

This is very interesting.  How does one hook in the proper call-backs to 
widgets in a complex, pre-existing GUI?  This is a very interesting problem.


Kaj Barry skribis:

> but with FXRuby, callbacks wouldn't have to affect the tree, since the links
> to callbacks are just one of the "MORE_CONSTRAINTS". 
> 
> How hard would it be to implement this style?

Not hard at all, I'd think.  Perhaps I hadn't thought about it yet when I 
posted the original pseudocode, but an easy way to do this would be:

	p = Panel.new(
		Button.new( "Hey, world!" ), method :myproc, CONSTRAINTS,
		#...
	)

	def myproc
		puts "Yada yada yada"
	end

Again, I'm not pushing this mechanism for describing GUIs; I just remember it 
as being easier to use and revisit than anything I've seen since.  There may 
be something better.

=== SER   Deutsch|Esperanto|Francaise|Linux|Java|Aikido|Dirigibles|GPG
=== http://www.germane-software.com/~ser  jabber.com:ser  ICQ:83578737
I'll never forget the first time I ran Windows, but I'm trying...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.2 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7Aqa8P0KxygnleI8RAhOXAJ9x64FP5GTbUY3oQYw43dS7V8nEuwCeK9qn
vJ64iSTkCU9zVlUafvFvUDE=
=ZB/4
-----END PGP SIGNATURE-----