Hi Hilaire, The example builder is specialised so that the example dialogs are not opened modally, just so it is easier to explore using each. There are currently two "standard" ways of utilising Polymorph widgets, depending on whether you are working at the Morph or Model level. For Morph based things: Either include the trait TEasilyThemed that provides access to the api for the morph or subclass ComposableMorph, which does effectively the same thing (assuming it is a "from scratch" morph that does not need to inherit from elsewhere. As an alternative, you may use the "model" way below... For Model based things: Use UITheme newBuilder and request the api from that object (just a ComposableMorph). For example, a method to return a list for a model might look like: newWorkingCopyListMorph "Answer a new list morph for the working copy list." ^UITheme builder newListFor: self list: #workingCopyList selected: #workingCopyListIndex changeSelected: #workingCopyListIndex: help: nil Of course, if you want a window then you can use a StandardWindow (subclass of SystemWindow) that includes the TEasilyThemed trait and delegate requests for widgets to that instead. Hope that helps... Gary. ----- Original Message ----- From: "Hilaire Fernandes" <hilaire@ofset.org> To: "An open mailing list to discuss any topics related to an open-sourceSmalltalk" <pharo-project@lists.gforge.inria.fr> Sent: Thursday, September 11, 2008 9:09 PM Subject: [Pharo-project] Learning how to use Polymorph
Gary,
I am looking at Polymorph examples, to start learning it.
From your example, I see you have this ExampleBuilderMorph class Is it a class I can use to build my application interface, or do I need to subclass another MorphicModel (this last class is pretty large) ?
I see you are using trait for this class also.
Hilaire
-- http://blog.ofset.org/hilaire
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project