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: 07 Sep 2002 04:11:10 -0600

On Sat, 2002-09-07 at 03:15, Kero van Gelder wrote:
> 
> Naturally. What's the use of displaying a Label if the parent isn't
> there, yet? What would be a use for the Label to exist without being
> displayed?
> 

well, that's the thing really. for GUtopIa a meta-widget needs to
"exist" first so it can be assigned to a parent. this is due to the
unique way in which child widgets get assigned to parent widgets. ex-

  abutton = GUtopIa::Button.new.text("Hit Me!")
  awindow = GUtopIa::Window.new(:layout=>:grid)
  awindow.body = [[abutton]]

see how the button is placed into the window? so the button must have
some form of existence prior to the window's body assignment. (by the
way i varied the two #new statements just to show how GUtopIa can handle
various types of constructors.)

by defining what the container contains, rather than what the
contained-thing is contained-by (as in other toolkits), we get a more
intuitive api. IMHO. plus we get the advantage of a unique and powerful
way to manage layouts: FYI- the layout attribute will eventually be
gotten rid of, as the layout can be determined by the data-stucture of
body, i.e. an array of array of components implies :grid.

-- 
tom sawyer, aka transami
address@hidden





reply via email to

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