Received: Sun, 11 Apr 2004 04:17:06 +0900
And lo, Hal wrote:

> Kero wrote:
> > To stress the difference between action-blocks and layout-blocks, why not
> > use do-end for the actions and { } for the layout?
> 
> Thanks for weighing in on this, Kero. I can't help but feel if this
> thread stays alive long enough, something good will come from it. :)
> 
> I sympathize with your comment above, but I have a habit in Ruby
> almost from Day 1 of using braces for one-line blocks and do/end for
> multiple lines.
> 
> Personally I'd rather just remember that containers contain things,
> and non-containers have default actions.
> 
> Besides, someday someone would exchange {} for do/end and wonder why
> his code didn't change behavior. ;)
> 
> Hmm, we should get vruz in on this. (vruz, are you listening??) He is
> very interested in gui toolkits and their usability.

Been meaning to chime in on Kero's posts, but got distracted with coding :D. And this is a timely reminder.

Buttons are capable of more than just labels. One of my tests has a button with an image.

button {
  image "filename.jpg"
  on_click do
    ...
  end
}

And yet another one which uses its own block to define a context menu

button {
  label "context menu"
  cm = cmenu {
    menuitem("Save as") do
      ...
    end
    submenu("foo") {
      menuitem("bar") do
        ...
      end
    }
  }
  on_click do
    popup cm
  end
}

Kero's mentioning of the GtkTree has been sticking in my mind like a painful sea urchin. No matter how I approach it, it either seems too unwieldy, not functional enough, or not Ez. Mostly trying to think of how I'd display, say, gaim's buddy list in it. -> Need select actions, etc. :-/.

What I've got implemented in my ezgtk so far -

windows, hbox, vbox, buttons, labels, images, my scintilla widget,
menus, notebooks with pages (tabbed widgets), a basic dialog example
... that's about it so far.

- Greg