UI Reading In Text Field Input

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

UI Reading In Text Field Input

calcrisk33
I am at the moment putting together a simple UI with Morphic Designer.  I am struggling to find a way to read in user input.  For example:

A user inputs a string/number into a text field then presses a button --> how do I print this to Transcript or save the user input to a variable.  I am familiar with Java but can not wrap my head around this.

Any help or a snippet of code would be much appreciated!
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: UI Reading In Text Field Input

Gary Dunn-2

The input field IS the container. You can retrieve the user input by sending it a message, probably aTextField contents. If you really need to store that elsewhere you can do an assignment, like myName := aTextField contents. Finally, put that assignment in the method invoked by the submit button's onClick handler.

Sometimes it helps to remind yourself that Smalltalk is not Java. Hope this helps.

Gary Dunn
Open Slate Project
http://openslate.org

On Apr 24, 2011 6:30 PM, "calcrisk33" <[hidden email]> wrote:

I am at the moment putting together a simple UI with Morphic Designer.  I am
struggling to find a way to read in user input.  For example:

A user inputs a string/number into a text field then presses a button -->
how do I print this to Transcript or save the user input to a variable.  I
am familiar with Java but can not wrap my head around this.

Any help or a snippet of code would be much appreciated!
Thanks

--
View this message in context: http://forum.world.st/UI-Reading-In-Text-Field-Input-tp3472564p3472564.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: UI Reading In Text Field Input

calcrisk33
Appreciate it!