[Cuis-dev] DiskProxy usage

Hilaire Fernandes hfern at free.fr
Sat Nov 30 03:23:50 PST 2024


Hi folks,

When I look at the code, at line 9 :

  1
  2
  3
  4
  5
  6
  7
  8
  9
10

	

DataStream>>nextPut: anObject
	"Write anObject to the receiver stream. Answer anObject."
	|typeID selector objectToStore |

	typeID := self typeIDFor: anObject.
	(self tryToPutReference: anObject typeID: typeID)
		ifTrue: [^ anObject].

	objectToStore := (self objectIfBlocked: anObject)objectForDataStream: self.
	objectToStore == anObject ifFalse: [typeID := self typeIDFor: objectToStore].

Then in DiskProxy usage, for example:

WorldMorph>>objectForDataStream: refStrm
	"I am about to be written on an object file. Write a path to me in the 
other system instead."

	|dp |
	dp := DiskProxy global: #Smalltalk selector: #runningWorld args: #().
	refStrm replace: self with: dp.
	^ dp

The refStrm replace: self with: dp. does not make sense to me because 
self was not added to the stream yet

What am I missing?

Thanks

Hilaire


-- 
http://mamot.fr/@drgeo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20241130/50b30e38/attachment.htm>


More information about the Cuis-dev mailing list