GUI updating problem
Bert Freudenberg
bert at impara.de
Tue Dec 20 13:08:09 UTC 2005
Am 19.12.2005 um 22:48 schrieb Marcus Pedersén:
> Hi!
> I have got a GUI containing a TextMorph and my app is supposed to
> connect to a database. Just before I connect to my database I
> change my TextMorph like this:
> myTextMorph contents: 'Connecting...'.
> .....code for connecting to db.
> But the GUI is not updated until I'm connected to the db.
> How do I make sure that the GUI is updated before the connection
> starts?
> Something like?:
> myTextMorph contents: 'Connecting...'.
> myGUI isUpdated
> whileFalse: [].
> .....code for connecting to db.
The proper solution would be to put any possibly blocking operation
(like connecting) in a background process.
The simple way is to call "World doOneCycleNow" which will, amongst
other things, update the UI.
- Bert -
More information about the Squeak-dev
mailing list
|