Could someone please provide an example of this?
The way to adapt to the behaviour of the ValueModel
used in the ModelViewController
Say, you have a Person class with two accessors:
name := aString.
The pair of accessors (name/name:) is called an aspect
. You can treat an aspect as a
, passing it to UI elements expecting ValueModel
. In MVP:
person := Person new.
adaptor := person aspectValue: #name.
adaptor value: 'Mister One'.
TextPresenter showOn: adaptor.
View edit of May 27, 2004
or FindPage with title or text search