Hi People:
I'm playing with some Morph packages that I would like to port to Cuis. I managed to understand several differences between Morphic of Cuis and Morphic of Squeak, but I'm a bit disoriented with #bounds that is an instvar very used in Squeak and return a rectangle with the corners of the morph.
How I should replace this method in a proper way in Cuis? _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org |
On Sun, 22 Dec 2013 14:41:26 -0200
Germán Arduino <[hidden email]> wrote: > Hi People: > > I'm playing with some Morph packages that I would like to port to Cuis. > > I managed to understand several differences between Morphic of Cuis and > Morphic of Squeak, but I'm a bit disoriented with #bounds that is an > instvar very used in Squeak and return a rectangle with the corners of the > morph. > > How I should replace this method in a proper way in Cuis? In Cuis, the morph's origin is relative to itself so the topLeft corner is always 0@0. I would suggest: 0@0 extent: self morphExtent This is, by the way, the default code in Morph>>layoutBounds, but layoutBounds is overridden in various subclasses so is not a substitute for bounds. Cheers, -KenD _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
-KenD
|
In reply to this post by garduino
On Sun, 22 Dec 2013 14:41:26 -0200
Germán Arduino <[hidden email]> wrote: > How I should replace this method in a proper way in Cuis? Oh. I should mention Morph>>morphBoundsInWorld which returns what Squeak would return -- the world coordinates of the bounds of the morph. -KenD _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
-KenD
|
Thanks you very much Ken! Your explanation permit me go ahead (with new doubts surely) but learning this obscure world of Morphic!
2013/12/22 Ken Dickey <[hidden email]>
Saludos / Regards,
Germán Arduino www.arduinosoftware.com _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org |
In reply to this post by garduino
The main difference is that in Cuis, a Morph's position is relative to whatever Morph it's embedded in, whereas in Squeak/Pharo, it's relative to the World. The Cuis solution is simpler and more forward-looking. It was implemented to support Morphic 3 and a zoomable interface.
_______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org |
On 23 December 2013 03:09, Casey Ransberger <[hidden email]> wrote:
> The main difference is that in Cuis, a Morph's position is relative to > whatever Morph it's embedded in, whereas in Squeak/Pharo, it's relative to > the World. > > The Cuis solution is simpler and more forward-looking. It was implemented to > support Morphic 3 and a zoomable interface. I think you mean by "simpler and more forward-looking" that it's "the only sensible choice"! Using absolute coordinates means not being able to compose different coordinate systems. frank > On Dec 22, 2013, at 8:41 AM, Germán Arduino <[hidden email]> wrote: > > Hi People: > > I'm playing with some Morph packages that I would like to port to Cuis. > > I managed to understand several differences between Morphic of Cuis and > Morphic of Squeak, but I'm a bit disoriented with #bounds that is an instvar > very used in Squeak and return a rectangle with the corners of the morph. > > How I should replace this method in a proper way in Cuis? > > Thanks. > > > -- > Saludos / Regards, > Germán Arduino > www.arduinosoftware.com > > _______________________________________________ > Cuis mailing list > [hidden email] > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org > > > _______________________________________________ > Cuis mailing list > [hidden email] > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org > _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org |
> On Dec 23, 2013, at 2:03 AM, Frank Shearar <[hidden email]> wrote: > > I think you mean by "simpler and more forward-looking" that it's "the > only sensible choice"! Using absolute coordinates means not being able > to compose different coordinate systems. > > frank It's also easier to think about IMHO. You don't have to worry about the rest of the World. You just have to worry about yourself and your own context. Which is rather analogous to the idea of hiding state-process. Casey _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org |
Free forum by Nabble | Edit this page |