[Cuis] StringMorph and lf
Dan
dnorton at mindspring.com
Sun Jan 25 21:19:34 CST 2015
Howdy,
On 24 Jan 2015 at 20:44, dnorton at mindspring.com wrote:
> Hi Juan,
>
> By subclassing SystemWindow, I defined a simple window with 3 panes,
> using LayoutMorph
> newRow for each. Two of these have StringMorph as a submorph.
> Strings in this app, which
> are for display only, contain Character lf in several places are
> sent using
> StringMorph>contents:. They are drawn with every lf removed. Can
> StringMorph be
> commanded to honor the lf? Is there something better that should be
> used instead of
> StringMorph?
>
Using StringMorph in this way may be too simplistic.
Instead use TextModelMorph with a model which is a subclass of TextModel. At least this
can draw with the lf characters in place. It's more complex and it allows editing of the string
by default but maybe that can be suppressed?
- Dan Norton
More information about the Cuis
mailing list