In Smalltalk using Pharo, I'm creating an application that reads the user input and does X.
So far I've managed to make a TextMorph that a user could enter a value into, but I'm unsure of how to read from TextMorphs and then do something with the value.
Any ideas?
Thanks
Well, you can simply send
text
to your morph and get it's contents. So you could have a button and when button is pressed you do something with contents:However maybe you want to use a dialog? Because you can do:
And then the execution of
UIManager default request: '…'
will open a dialog with a text input