[Pkg] The Trunk: System-ml.425.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Mar 9 04:16:33 UTC 2011


David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ml.425.mcz

==================== Summary ====================

Name: System-ml.425
Author: ml
Time: 8 March 2011, 7:52:50.902 pm
UUID: fc18c8bc-6123-4d6a-a784-ed398f9f3afe
Ancestors: System-dtl.424

Changed openPort: to honor the primitive's result code.
On failure it doesn't set port: and answers nil.

=============== Diff against System-dtl.424 ===============

Item was changed:
  ----- Method: SerialPort>>openPort: (in category 'open/close') -----
  openPort: portId 
  	"Open the given serial port, using the settings specified by my
  	instance variables."
+ 	| p |
  	self close.
+ 	p := portId isString
- 	portId isString
  		ifTrue: [self
  				primOpenPortByName: portId
  				baudRate: baudRate
  				stopBitsType: stopBitsType
  				parityType: parityType
  				dataBits: dataBits
  				inFlowControlType: inputFlowControlType
  				outFlowControlType: outputFlowControlType
  				xOnByte: xOnByte
  				xOffByte: xOffByte]
  		ifFalse: [self
  				primOpenPort: portId
  				baudRate: baudRate
  				stopBitsType: stopBitsType
  				parityType: parityType
  				dataBits: dataBits
  				inFlowControlType: inputFlowControlType
  				outFlowControlType: outputFlowControlType
  				xOnByte: xOnByte
  				xOffByte: xOffByte].
+ 	^p ifNotNil: [
+ 		port := portId.
+ 		self]!
- 	port := portId!



More information about the Packages mailing list