[squeak-dev] morph selector x: x and y: y
nicolaihess at gmail.com
Wed Mar 6 08:00:28 UTC 2013
2013/3/5 Bert Freudenberg <bert at freudenbergs.de>
> On 2013-03-05, at 08:46, Nicolai Hess <nicolaihess at gmail.com> wrote:
> > Hi,
> > someone knows why Morphs selector x x: and y y: are implemented
> > Morph y and y: testing wether self world is nil whereas x and x: doesn't.
> That's because the y coordinate does not need to be flipped.
> As Marcel wrote, these should be moved to the Etoys package.
> > Btw. what is the preferred way to position morphs relative
> > to the bounds of its owner. It seems morph positions are always
> > absolute coordinates.
> The preferred way would be to use a layout.
> A common way for absolute positioning is to add the children while the
> parent is still at 0 at 0.
> Or, just embrace global coords:
> child center: parent center.
> (similar for other setters like #topLeft etc)
> - Bert -
that means etoys uses x/y coordinates with origin at lower left screen
and morphs top/left are coordinates with origin at upper left screen corner.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev