Skip to content

Basic operations with Morphs

Dr. Nicola Mingotti edited this page Feb 4, 2022 · 5 revisions
  • All morphs are discendants of the class Morph.
  • We will make our  examples on BoxedMorph , which is already more elaborate than Morph, but it has the benefit of corresponding to something all of us know: a rectangular widget.  Many of the builtin Morphs of interest are subclasses of BoxedMorph e.g. LayoutMorph, LabelMorph etc.
b1 _ BoxedMorph  new. 
  • Once the morph is created is it not immediately represented.
  • You cat view a morph in the World with b1 openInWorld, I prefer to use b1 openInHand which attaches the morph to my mouse pointer and i can drop it with a click into the world where i wish.
  • ATTENTION. Not to clutter too much the names in the following i will say 'every morph is/has ..' , but the experiments will be all made on BoxedMorph ! -- NOT SURE THIS IS A GOOD IDEA
  • Every morph has a name, and you can change it. use the name and name: messages.
  • You can always destroy/eliminate a morph with sending the message delete .
  • TODO. size
  • TODO. position
  • TODO. rotation
  • TODO. color
  • a
  • b
  • c
  • z
  • q
Clone this wiki locally