[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rgui-dev] Tom's yaml interface definition
From: |
Kero van Gelder |
Subject: |
Re: [rgui-dev] Tom's yaml interface definition |
Date: |
Tue, 17 Dec 2002 00:19:33 +0100 |
User-agent: |
Mutt/1.4i |
> What I called function in calllback might be generated automatically.
> Having to write it out might add flexibility though. This is a tradeoff
> we will often have to face. The attribute or return parameter or
> whatever could turn out to be essential though.
The attribute(s) are interesting.
These attributes are usually passed around in higher level events
in toolkits, but that's fixed.
...i.e. the FileChosenEvent (from FileDialog) has a field filename.
> The seperate attribute in the file_menu is needed to allow the client
> app to determine the filename by other means and have filemenu generate
> the file_menu.save event without instantiating file_dialog first.
Depends where the file name is stored when opening the file first: not
in the GUI, I hope, since that would ruin MVC.
> I also used callback without defining function and attribute. That way
> the argument becomes the argument of function. The thing starts becoming
> messy already. We have introduced a dozen keywords and now I start
> messing everything up. Damn.
Usually happens when you dig into toolkits :(
> General remarks. The event clause is indeed very interesting. I don't
> know if this a problem, but if you have more than one action bound to an
> event, the execution order is undefined. This problem does not occur in
> the gui-toolkits I know.
Last subscribed, first executed. Can even block earlier subscribers
that way (and believe me, that can be SO useful :)
So
widget:
action:
name: one
callback: cb_one
attribute: entry1.string
action:
name: two
callback: cb_two
attribute: entry6.string
would execute cb_two first.
> I can't imagine that what we are talking about has not been tried
> before.
X-Forms come to mind (XML, W3C). Doesn't the gecko engine render with
some XML, too? The (former) kaffe environment for iPAQ did something
similar, iirc.
Please keep your feet on the ground.
> Language choice:
> What I really like about your choosing yaml is its supreme readability.
> For this stage of communicating ideas, it seems well suited (maybe I
> should learn it before evaluating it though ...). However, if this ever
> gets beyond the stage of enthusiastic brainstorming, we should think
> about other options too.
I like the language Ruby as a way of comunicating. It has more
expressive power, since it's not restricted to declarative
statements. Keep in mind that GUI's are well-suited for declaritive
languages, though.
and I like a few attributes on a horizontal line above 25 lines for
one widget. I.e. readability is personal, already :(
Bye,
Kero.
+--- Kero ------------------------------ address@hidden ---+
| Don't split your mentality without thinking twice |
| Proud like a God -- Guano Apes |
+--- M38c ---------- http://httpd.chello.nl/k.vangelder ---+