[Pharo-users] Get a String during the execution

Valentin Ryckewaert valentin.ryckewaert at gmail.com
Wed May 18 08:08:09 EDT 2016


Hi !

I'm trying to make a method able to ask the user to write something which
will be used in the method.
During my method execution, a pop up appear on the screen, the user write
anything 'test' for exemple, and then the method continue using this string.

The code looks like this:
MyClass>>dostuff
mypopup := MyPopup new.
mypopup openDialogWithSpec.
mypopup window okAction: [ date := mapop input text. dostuff with the
variable date ]."

And then I execute this method:
MyClass new dostuff.
SessionManager default snapshot: false andQuit: true (To close Pharo)

The problem is that the method dostuff wait the proc of the popup to make
what is in the bloc but continue execution and close Pharo.
I would like to be able to stop execution of the code just after mypopup
window okAction and to reactivate it in the bloc executed when it's proc.
Is it possible?

Valentin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20160518/b2e3754e/attachment.html>


More information about the Pharo-users mailing list