Bug with Morphic and Asynch process?

Dave Mason dmason at sarg.ryerson.ca
Fri Oct 21 14:27:29 UTC 2005


I am trying to write a simple Morphic clock application with a ticker
process.  It runs fine for a bit, and then dies with a
   MessageNotUnderstood: UndefinedObject>>adaptToPoint

This comes from NewParagraph>>displayOn:using:at: where it says:
   offset _ somePosition - positionWhenComposed
with positionWhenComposed being nil, but when I look in the debug window,
positionWhenComposed has a value of 0 at 0 !!!  If I restart the frame and
proceed it runs to completion properly (though the error has already
messed up the GUI).

I looked on Mantis, but couldn't find anything like this, so I created
bug number 0002114, and you can see reproduction instructions there.

Am I doing something horribly wrong?  Is there a better way to do this?

I'm also looking for a Morph like SystemWindow (i.e. with something like
#addMorph:frame:) but without the menubar on top or rounded corners.

Thanks  ../Dave

Clock>>nextSecond
	time:=time addSeconds: 1.
	self changed: #display

Clock>>start
	ticker ifNil: [
		ticker:=[[true] whileTrue:
					 [(Delay forSeconds: 1)wait.
					  self nextSecond]]
				newProcess.
		ticker priority: Processor userBackgroundPriority;
			     resume]

Clock>>stop
	ticker ifNotNil: [ticker terminate.ticker:=nil]


ClockView>>initModelView
	| morph |
	morph := PluggableTextMorph on: model text: #display accept: nil.
	win addMorph: morph frame: (0.3 at 0.3 extent: 0.3 at 0.3)



More information about the Squeak-dev mailing list