Hi Juan, i have a couple of questions regarding the new Cuis layout, which by the way , is a much cleaner implementation!. "LayoutSpecs are the basis for a new layout mechanism, alternative to LayoutFrame. Any Morph can be given a LayoutSpec, but in order to honor it, the morph must be submorph of a LayoutMorph." In my opinion, we dont need to enforce the LayoutMorph subclasification. Because Morph>>doLayoutIfNeeded could use its "layoutMorphSpec" collaborator, if present. doLayoutIfNeeded ... [self layoutSpec layoutSubmorphsIn: self layoutBounds] on: Error do: [ :ex | ... What do you think? Fernando pd: Similar to decoupling the "visual layout properties" that Brazil is doing. On Mon, Nov 8, 2010 at 3:05 PM, Juan Vuletich <juan@jvuletich.org> wrote:
Hi Folks,
WRT Layout APIs, SimpleMorphic includes the same simplified version of LayoutFrame as Cuis.
Cuis also includes a new approach, implemented in LayoutSpec and LayoutMorph. I did this for an application that requies adding new widgets without specifying a new layout for all of them. It is also nicer than LayoutFrame, and will replace it at some moment. But it is not used at all by SimpleMorphic or Cuis, and that's why I did not include it in SimpleMorphic for Pharo. But you might open Cuis and take a look it, and load it in Pharo if you like. Try the example class methods in LayoutMorph, and resize the morph to see what it can do.
Cheers, Juan Vuletich