> <
tom.schindl@xxxxxxxxxxxxxxx <mailto:
tom.schindl@xxxxxxxxxxxxxxx>> wrote:
>
>     Hi Kevin,
>
>     Can you clarify this? I don't see a problem with going through the DOM.
>     I'd argue that someone is not even getting access anymore to the REALLY
>     widget when he/she is using declarative UI.
>
>     You may ask why does one not have access to the widget:
>     a) Did you ever see a WebDeveloper trying to access the real
>       Native-Gecko-Button? SWT is just a renderer of the widget
>       like Gecko, ... is in a browser.
>
>     b) The DOM you are seeing and the Widget-Hierarchy don't necessary have
>       a one-to-one mapping. E.g. let's say I want to have fancy border
>       drawing in SWT then my DOM looks like this:
>
>       <composite border="black 2px" layout="grid">
>         <label text="BlaBla 1" />
>         <label text="BlaBla 2" />
>       </composite>
>
>       whereas the widget structure is like this:
>
>       Composite (FillLayout=margin=2, backgroundColor=black)
>          Composite(GridLayout)
>             Label
>             Label
>
>     c) What do you script against? The real widget is not right IMHO because
>       of 2 and 3
>
>     The above example of a border is the reason I'm not a friend anymore of
>     a low-level dialect like XSWT but favor some higher level of Declarative
>     UI. As long as I programm against the high-level DOM it doesn't bother
>     me how a feature gets implemented at the widget-level
>     (widget-composition, gc-drawing, ....). Naturally the above border could
>     get implemented also by subclassing Composite + PaintListener but I
>     guess you'll get the point, right? By the way how is such a problem
>     solved when the border definition is coming from an CSS-Stylesheet?
>
>     When we talk about modeling the workbench it even gets worse because
>     e.g. a StackedPart can get rendered by a completely different
>     widget-type for example:
>     - CTabFolder
>     - TabFolder
>     - Nebula-PShelf
>     - ...
>
>
>     Tom
>
>     Kevin McGuire schrieb:
>     >
>     > Actually this approach concerns me: if I go through the model, or go
>     > directly against SWT, I get different notification.  It could easily
>     > lead to bugs in application code.  I would also argue that the
>     model is
>     > then no longer a model of SWT, but rather, a model of an enhanced SWT
>     > which doesn't exist.
>     >
>     > Regards,
>     > Kevin
>     >
>     >
>     >
>     >
>     > *Tom Schindl <
tom.schindl@xxxxxxxxxxxxxxx