gutopia-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rgui-dev] RE: Backend


From: Tom Sawyer
Subject: Re: [rgui-dev] RE: Backend
Date: 06 Sep 2002 19:33:22 -0600

kero-

> I think code examples that show how to use the ideas can make it much
> more alive. At least for me. It also helps to answer the question
> "What would be the ultimate GUI code for you?" 'coz writing it shows
> what is still wrong.

hmm..do you mean like the examples i have in the CVS? i'm not sure i
follow. have you downloaded all the source?  i haven't updated the link
on my web page recently, but if you don't want to mess with the CVS
stuff (and i can't say i would blame you) then i will. in fact i'll just
do it anyway: http://www.transami.net/ruby/, give me a couple hours to
get to it.

> Don't be too fast to drop it.
> Part of the exercise is to find out some abstraction layer that fits
> more than one toolkit. As soon as we use more than one, it's useful.

well, okay, i won't right away. that's for sure. but i'm starting too
see places where these other toolkits do things in a way that i'd like
to be able to go beyond. but certainly it can wait.
 
> In my opinion (and therefore in Ruby-Wise), a Button is a Label that
> can be clicked. Thus, it need not take care of displaying a String,
> fonts and other things.

agreed. interestingly in GUtopIa, being Ruby code, this is expressed by
a widget called Button that inherits the Labled mixin, just as the Label
widget itself does.

> For a native binding, a Button would be a Gtk::Button, but that still
> allows the Gutopia::Button to take its attribute(:event) from
> Gutopia::Label
> 
> This OO exercise should keep the footprint of Ruby-Wise small.
> 
> > > What I'm missing is a picture like the Rouge alpha/beta/gamma.
> > > Ruby-Wise was intended as the pure Ruby gamma implementation,
> > > i.e. old-fashioned toolkit (but with all great features from
> > > tk/gtk/andmore combined). Anything like XML, IDE, functional
> > > reactivity, who-knows-what (maybe even layout managers?) is in layers
> > > above.
> > 
> > not perfect or super detailed, but look at the picture here:
> > 
> >   http://www.rubygui.org/cgi-bin/wiki.pl?GUtopIa_Common_Meta-API
> > 
> > wise.rb is one of these backend wrappers.
> 
> Sorry, that's only obvious stuff...

sorry, i didn't think the Rouge alpha/beta/gamma picture was anymore
detailed.

> The Markup halfway the page is not in the picture on top.

which markup? what kind of picture should i draw?

> > > So, I've done a bit of setup for the runtime choice of native toolkit,
> > > attached toolkit.rb
> > 
> > i looked at this but didn't quite follow. could you explain a little?
> 
> 1) take a set of toolkits, sorted on Gutopia priority (whatever that is)
> 2) check whether there is a Ruby binding for each toolkit, (and that
>    it can run, i.e. the toolkit itself exists)
> 3) check whether there is a running environment for each toolkit, 'coz
>    a running environment means a user preference; Wise should be on
>    this list as often as possible.
> 4) include the top-of-the-list in Gutopia, so the implementation of
>    widgets is available, users can now call Gutopia::Window.new()

i see. thanks.

> > also, the question as to whether we should even bother with other
> > backends is up in the air. i really am leaning toward just supporting
> > ruby-wise and developing it into the versitle "Chameleon".
> > 
> > i'm not sure what Leon'a stance on ParaGUI with GUtopIa is at this
> > point. i know his goal for ParaGUI was to create a game, and perhaps
> > he's already started into that with his bindings. of course my first
> > thought was that ParaGUI would be able to serve as this chameleon tk,
> > but Leon suggested that ParaGUI might not be up to the task. haven't
> > heard anything about that since, only his suggestion that ruby-wise
> > would probably the better route.
> > 
> > > After which I did a bit of hacking in Wise, where I got lost in
> > >   "Some String".instance_of? String   => false
> > > which is wrong, of course. But it doesn't help for productivity :(
> > 
> > how about kind_of?
> 
> Confused ::String and Wise::String :)
> 
> 
> The hacking make steps towards constructors like:
> 
>   Button.new("Press here") { p "Pressed here!" }
> 
> instead of
> 
>   Button.new(nil, :text=>"Press here") { p "Pressed here!" }
> 
> and also allows Window.new(:modal) for Window.new(:modal=>true)
> so this would allow for shorter code for the user.

now, here i stress: "please be careful". it looks to me like your
starting to either "pre-argument" your calls with the most common
attributes of your widgets, or use object type checking to determine
which attribute is being specified. this is a road to madness! try
programming in Rebol if you don't believe me. it is better that the code
be clean and easily deciphered rather then compact. IMHO. please give it
some consideration.
 
> I am still interested in making the Ruby-Wise API as convenient as
> possible, and consequently what Gutopia provides directly above the
> toolkit should not be "worse". In higher layers, many interesting
> things can be done.

well, i think it will be about the same, at least as far as actually
creating widgets. but only at first. later on we will up the ante and
find a way to make GUtopIa "gui-intelligent" to ease the task of gui
creation.

> Tell you what, I'll think about components that are in X or otherwise
> below Ruby-Wise. Some of those pop up within or above Ruby-Wise, like
> the WM. If I work a bit on the docs of the API that is below
> Ruby-Wise, I might just form a better opinion of the blocks
> surrounding it in Gutopia.

very cool. let me know what you find/determine.

-tom


> +--- Kero ------------------------------ address@hidden ---+
> |  Don't split your mentality without thinking twice       |
> |                          Proud like a God -- Guano Apes  |
> +--- M38c ---------- http://httpd.chello.nl/k.vangelder ---+
> 
> 
> 
> _______________________________________________
> Gutopia-dev mailing list
> address@hidden
> http://mail.freesoftware.fsf.org/mailman/listinfo/gutopia-dev
> 
-- 
tom sawyer, aka transami
address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]