Status of Flow Serial support?

Ned Konz ned at bike-nomad.com
Fri Sep 14 15:29:48 UTC 2001


On Friday 14 September 2001 04:39 am, Ken G. Brown wrote:

> So far I've got a process doing readString's on the port but output
> to several TranscriptStream windows gets confused. Today I'm looking
> at implementing a SharedQueue, perhaps also requiring WorldState
> addDeferredMessage as I saw on the list.

What do you mean it gets confused? Morphic is single threaded, and if you try 
to make it re-draw from multiple non-UI threads you can have problems.

Note that you can use WorldState addDeferredMessage: simply like this:

readFromPort: port toTranscript: transcript
| myString |
myString _ port readString.
myString isEmpty ifFalse: [
   WorldState addDeferredMessage: [ transcript show: myString ]
].

Remember too that if you use show: on the transcripts, performance is going 
to suffer because you'll be redrawing them all the time. Of course, if you 
have to see the serial stream as it comes in you'll need to do this (the 
alternative is to call nextPutAll: and then eventually call flush).

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com




More information about the Squeak-dev mailing list