'From Squeak3.2alpha of 1 November 2001 [latest update: #4599] on 11 December 2001 at 1:02:03 pm'! !InputSensor methodsFor: 'accessing' stamp: 'JMM 10/5/2001 12:54'! flushAllButDandDEvents! ! !EventSensor methodsFor: 'initialize' stamp: 'JMM 10/5/2001 12:43'! initialize "Initialize the receiver" mouseButtons _ 0. mousePosition _ 0@0. keyboardBuffer _ SharedQueue new. interruptKey _ interruptKey ifNil:[2094]. "cmd-." interruptSemaphore _ (Smalltalk specialObjectsArray at: 31) ifNil:[Semaphore new]. self flushAllButDandDEvents. inputProcess _ nil. inputSemaphore _ Semaphore new. ! ! !EventSensor methodsFor: 'initialize' stamp: 'JMM 10/5/2001 12:54'! startUp "Run the I/O process" self shutDown. self initialize. self primSetInputSemaphore: (Smalltalk registerExternalObject: inputSemaphore). inputProcess _ [self ioProcess] forkAt: Processor lowIOPriority. super startUp. Smalltalk isMorphic ifTrue:[self flushAllButDandDEvents].! ! !EventSensor methodsFor: 'accessing' stamp: 'JMM 10/5/2001 13:46'! flushAllButDandDEvents | newQueue oldQueue | newQueue _ SharedQueue new. self eventQueue ifNil: [self eventQueue: newQueue. ^self]. oldQueue _ self eventQueue. [oldQueue size > 0] whileTrue: [| item type | item _ oldQueue next. type _ item at: 1. type = EventTypeDragDropFiles ifTrue: [ newQueue nextPut: item]]. self eventQueue: newQueue. ! ! !PasteUpMorph methodsFor: 'world state' stamp: 'JMM 12/11/2001 12:59'! install owner _ nil. "since we may have been inside another world previously" ActiveWorld _ self. ActiveHand _ self hands first. "default" ActiveEvent _ nil. submorphs do: [:ss | ss owner == nil ifTrue: [ss privateOwner: self]]. "Transcript that was in outPointers and then got deleted." self viewBox: Display boundingBox. Sensor flushAllButDandDEvents. worldState handsDo: [:h | h initForEvents]. self installFlaps. self borderWidth: 0. "default" (Preferences showSecurityStatus and:[SecurityManager default isInRestrictedMode]) ifTrue:[self borderWidth: 2; borderColor: Color red]. self presenter allExtantPlayers do:[:player| player prepareToBeRunning]. SystemWindow noteTopWindowIn: self. self displayWorldSafely. ! ! !Project methodsFor: 'menu messages' stamp: 'JMM 12/11/2001 13:01'! saveState "Save the current state in me prior to leaving this project" changeSet _ Smalltalk changes. thumbnail ifNotNil: [thumbnail hibernate]. Smalltalk isMorphic ifTrue: [world _ World. world sleep. ActiveWorld _ ActiveHand _ ActiveEvent _ nil] ifFalse: [world _ ScheduledControllers. ScheduledControllers unCacheWindows]. Sensor flushAllButDandDEvents. "Will be reinstalled by World>>install" transcript _ Transcript. ! !