Where are the dialog boxes for input/output?

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

Where are the dialog boxes for input/output?

LoneHunter01
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.
Reply | Threaded
Open this post in threaded view
|

Re: Where are the dialog boxes for input/output?

Herbert König
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:[hidden email]

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

Re: Where are the dialog boxes for input/output?

cbc
On 1/28/08, Herbert König <[hidden email]> 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)

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

Re: Where are the dialog boxes for input/output?

Michael van der Gulik-2
In reply to this post by Herbert König


On Jan 29, 2008 4:40 AM, Herbert König <[hidden email]> 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.


--
http://people.squeakfoundation.org/person/mikevdg
http://gulik.pbwiki.com/
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Where are the dialog boxes for input/output?

Michael Davies-2
On Jan 28, 2008 8:25 PM, Michael van der Gulik <[hidden email]> 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 mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners