I need a standard single line text entry widget
ned at bike-nomad.com
Tue Apr 9 19:58:13 UTC 2002
On Tuesday 09 April 2002 01:28 pm, Tim Rowledge wrote:
> Good Grief. People are expected to actually be able to work this
> out? I suppose folks that have done as much morphic hacking as ned
> might find it possible to keep track of but really, isn't this
> getting a little complex?
How I got this (in full):
* think of places where I've seen text entry fields.
* remember the Message Names browser.
* open one up
* test the widget. Figure it's good enough for an example.
* open a browser on the MessageNames class
* locate its initialization protocol
* look first at method #inMorphicWindowLabeled:, note that it just
* look at method named #inMorphicWindowWithInitialSearchString:
* look down a bit to where it constructs the PTM
* copy the text to a workspace.
* do it after adding the "openInHand"
* see it blow up on #searchString (which is a pluggable selector in my
* replace the model callbacks in the Workspace code with nil (and hope
that that doesn't blow up)
* try it again.
* note that size is too big.
* open up halos, size it to what looks like a single line.
* open up inspector from halo
* type in expression "self extent" in inspector and evaluate it.
* Copy that to my workspace and add the extent: call.
* try it again
* copy to mail message
All of which looks much more complex than it really was.
The alternative is to make a version of a text entry field that works
the way you want and get it added to Squeak. There have been several
people who have made these in the past. Look at
http://minnow.cc.gatech.edu/squeak/1576 for some of these.
If I were going to make one of these I'd probably try to construct
something out of a TextMorphForEditView, a TransformMorph, and a
GPG key ID: BEEA7EFE
More information about the Squeak-dev