Re: globalx/globaly

Adam Megacz <[email protected]> Mon, 22 Mar 2004 04:05:04 -0800
Newsgroups gmane.comp.java.xwt.core
Organization XWT
Message-ID <[email protected]>
David Crawshaw <[email protected]> writes:
> Big fan of relativistic thinking, but I you still need to be able to
> find your position relative to your root box.

Why?

> comparing the root (be it real or fake) with that of the child.

That makes sense.  I still don't think there are that many cases where
you really need this though.

BTW, I think the right way to do this is:

   var dist = box.distance(box2);
   var horizontal_distance = dist.x;
   var vertical_distance = dist.y;

Anybody want to write a patch for this?  And drop globalx/globaly
while we're at it?

I have no idea what to do about PosChange.  Do you think we can live
without it?  Perhaps you should be able to set a non-packed box's x/y
offset relative to *arbitrary* boxes, not just its parent.  I have a
bunch of reasons for wanting to get rid of the notify-me-when-I-move
thing; mainly because it has an obnoxious tendency to lead to infinite
loops.

  - a