Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-incubator-e4-dev] Fw: Declarative UI roundup?


Comments below.

David Orme wrote:

A node name is first converted to a setter.  If we can't find a method by that name, then we try to resolve the node as a class name.

That's something that struck me superficially looking at XAML.  I.e., they're "just" using class names as the element names where it's more usual to use feature/property names for the elements.   Of course for attributes, people always expect feature/property names, but for elements often people are surprised that the element name isn't a type name.  That becomes more obvious when the same type of object can play a role in more than one feature.  Of course if you have a single containment feature (as in window parenting), you don't have this problem and it seems quite natural to use types for element names, especially when it allows you to avoid using "xsi:type" or defining a plethora of substitution group elements to avoid xsi:type...

This works nearly all the time.

But to create a Text inside a Group becomes a problem since Group has setText().

To handle that rare case, XSWT has an <x:children> meta-node.  So you can write:

  <layout x:class="fillLayout">

This is like xsi:type I assume.  Think of how you'd do this in JSON.  It's important to have this information early...

    <text x:style="BORDER">

-Dave Orme

On Nov 6, 2008 4:25 PM, "Yves YANG" <yves.yang@xxxxxxxxxxx> wrote:

One question on your code: how do you make the difference between property "layout" and child "label"?



From: eclipse-incubator-e4-dev-bounces@xxxxxxxxxxx [mailto:eclipse-incubator-e4-dev-bounces@xxxxxxxxxxx] On Behalf Of David Orme

Sent: jeudi 6 novembre 2008 18:11

To: E4 developer list Subject: Re: [eclipse-incubator-e4-dev] Fw: Declarative UI roundup?

  Since I won't ask someone to do something I won't myself do, :-) here's a slightly-enhanced Hel...

eclipse-incubator-e4-dev mailing list

_______________________________________________ eclipse-incubator-e4-dev mailing list eclipse-incubator-e4-dev@xxxxxxxxxxx

Back to the top