Re: PATCH: Bug 186
David Crawshaw <[email protected]>
| Newsgroups | gmane.comp.java.xwt.general |
|---|---|
| Message-ID | <[email protected]> |
On Friday, March 28, 2003, at 12:04 AM, Charles Goodwin wrote:
> Apologies for the blunt end statement, but I've spent a lot of time
> redoing
> this widget audit and do not appreciate the dismissive attitude just
> because
> a complex widget does violate "The XWT Way" to a small degree. I
> wouldn't
> mind if you suggested an actual solution,
Well what I was suggesting was specifically designed not to be
dismissive.
Modifying your scrollpane to use $scrollpane.north is not a very big
change, and makes everything work properly. I never want to throw away
a person's work. That point is even more important when they donate the
work. :-)
Thinking about it for a second, axial slaves are pretty rare. I'd say
somewhere between 1% - 0.1% of scrollpanes actually use them. In fact,
the biggest use for them is your table. That's why I don't think the
manual approach is really a problem.
However, I have another solution. It's not perfectly clean from an xml
point of view (you can't do what yours can do), but it does have
another big advantage.
What if each child that was passed into the scrollpane could have a
series of boxes assigned as variables, like scroll_north, scroll_south,
etc. Then the _0 could read these 'loose' boxes out of the children,
and add them to the axial slaves.
When a box is being removed, _0 could check the scroll_north, etc
against the current axial slaves, and remove them if it finds them.
Now it's not xml-wise perfect, but it makes it very powerful. This
means doing:
<scrollpane>
<table/>
</scrollpane>
The table header can be read straight from the variable scroll_north
and added to the northen axial slave. And as soon as you move the table
to a different scrollpane, it follows without any extra thought.
This doesn't violate the "boxes stay where you put them" rule, because
the boxes being used weren't actually specific children of the other
boxes, they were simply being held in a variable. And it's got some
extra power.
If you like it, you don't have to add it. I'll do it on the weekend and
contribute it to your cvs.
d
_______________________________________________
http://lists.xwt.org/listinfo/dev