[Newbies] RE: problem with text editor
herbertkoenig at gmx.net
Tue Nov 25 11:58:31 UTC 2008
AC> Let's say user input name: Lisa and hit enter button,
AC> the GUI will display:
AC> List of user:
AC> If another user type in their name for example: Joan, then the screen will display:
AC> List of user:
AC> I write the method on the enter button to display the text
AC> but the text is always replacing the old one instead of append it
AC> to the next line. Do you have any advise how to make this work?
AC> Thanks in advance.
you will need a PluggableTextMorph. Actually this is not so simple,
the project I mentioned was a big help to me understanding this.
Imho what you will need is:
1- a model (not necessarily subclassed from Model) which has an
OrderedCollection of Strings plus an index on this collection if you
want to select from the list. This is where the users of your list end
2- a PluggableListMorph to display the entries.
The model needs to provide three methods to plug into the
a- #usersList this just returns the collection of your users.
b- #userSelection which returns the aforementioned index
c- #userSelection: which sets this index and does whatever you want to
do if your list is clicked.
Then you build the listmorph like:
list := PluggableListMorph
list: # usersList
Took me a while to come to terms with this but now I use it all the
I attached the UI of an app I use for billing time against my
customers. The button "New work" brings a FillInTheBlankMorph to get a
new entry. Clicking in the list fills the texts right of the list for
editing, Enter in one of the texts changes the list.
BTW the texts to edit are a subclass of StringButtonMorph where I only
Actually it took some time for me to get familiar with Morphic UI
construction but now I like it.
I'm willing to help further after you've been through the
Let me also mention UIEnhancements (I believe it's now called
Polymorph) which is about building Windoze like UI's (Gary Chambers is
the one) and easy morphic gui which is about graphical ui
construction. Sorry I only remember it was a french guy but I found it
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5184 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/beginners/attachments/20081125/39c8ad19/DayfileUI.gif
More information about the Beginners