I'm trying to do basic i/o using Squeak and I've looked through my browser, but I can't seem to find anything that allows simple (keyword: simple) dialog. All I want is to ask the user a question (What is your name?) and then respond using the string they provide (Hello, name). But I can't even figure out which morphs open popups.
My friend (equal knowledge of SmallTalk) did this in under 2 minutes using Visualworks, so I know it's possible. Any help would be appreciated.
Hello LoneHunter01,
L> I'm trying to do basic i/o using Squeak and I've looked through my browser, L> but I can't seem to find anything that allows simple (keyword: simple)
reply := FillInTheBlankMorph request: 'What is your real name' initialAnswer 'LoneHunter01'
For more browse the class side of FillInTheBlankMorph or ask here, if you can't make sense of this sentence.
Cheers
Herbert mailto:herbertkoenig@gmx.net
On 1/28/08, Herbert König herbertkoenig@gmx.net wrote:
Hello LoneHunter01,
reply := FillInTheBlankMorph request: 'What is your real name' initialAnswer
'LoneHunter01'
And then responding can be as simple as:
self inform: ('Hello ', reply)
On Jan 29, 2008 4:40 AM, Herbert König herbertkoenig@gmx.net wrote:
Hello LoneHunter01,
L> I'm trying to do basic i/o using Squeak and I've looked through my browser, L> but I can't seem to find anything that allows simple (keyword: simple)
reply := FillInTheBlankMorph request: 'What is your real name' initialAnswer 'LoneHunter01'
For more browse the class side of FillInTheBlankMorph or ask here, if you can't make sense of this sentence.
It would be better to use ToolBuilder classes for user interfaces. That way, you can run your application on Morphic, MVC, Tweak or any other UI that comes along.
Sorry I don't have Squeak available to give exact results at this time, but I believe that in recent images there should be a class called something like UIManager with methods to do things like this.
There's also a class called FillInTheBlank which does the same job as the FillInTheBlankMorph, but I'd discourage people from using it directly.
Gulik.
On Jan 28, 2008 8:25 PM, Michael van der Gulik mikevdg@gmail.com wrote: ...
Sorry I don't have Squeak available to give exact results at this time, but I believe that in recent images there should be a class called something like UIManager with methods to do things like this.
What a great class: it's stuffed full of useful dialog boxes. Thanks for pointing it out - it only seems to have been mentioned in passing before.
For this specific case, you would use:
answer := UIManager default request: 'Please fill in some text' initialAnswer: 'type here'
beginners@lists.squeakfoundation.org