[Pharo-project] Implementing a Timer: "newProcessWith: anArray" fails

nullPointer epicfan at gmail.com
Mon Oct 18 07:55:42 EDT 2010


Now works :|


pvtStartProcess

	internalProcess := [ self pvtCallProcess: self] fork.



pvtGetNewProcessBlock

	^[:timer || intervalDelay |
		
		[timer enabled] whileTrue:[
		
			(Delay forMilliseconds: timer interval) wait. 

			timer enabled ifTrue:[
				
				timer raiseOnElapsedTimeForProcessThread: (timer getProcess).
				
				WorldState addDeferredUIMessage:[ 
					timer raiseOnElapsedTimeForUIThread: (timer getProcess) 
				].
			]
		].
	].



pvtCallProcess: oneParam

	| processBlock |
	
	processBlock := self pvtGetNewProcessBlock.
	processBlock value: oneParam.


Anyway I understand than the other way must be go. Something I did bad.

Many thanks for the help


-- 
View this message in context: http://forum.world.st/Implementing-a-Timer-newProcessWith-anArray-fails-tp2999831p3000083.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.




More information about the Pharo-dev mailing list