How can I fileout to an internal stream?
Ok. Ive run into a problem in 3dot10. When writing out text in a Sans Vera font it reads back in Accuny. That is, save the text morph and read it back.
Now Id like to write a test for this w/o actually having to write a file to disk.
All I need is to put an object into a stream encoded as if for saving and then read it back decoded from the same stream.
Whats the best way to do that? Ive chased methods till my eyes hurt and would like help, hopefully from someone who already knows the answer.
Yours in curiosity and service, --Jerome Peace
____________________________________________________________________________________ Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
El 9/6/07 8:53 PM, "Jerome Peace" peace_the_dreamer@yahoo.com escribió:
How can I fileout to an internal stream?
Ok. I¹ve run into a problem in 3dot10. When writing out text in a Sans Vera font it reads back in Accuny. That is, save the text morph and read it back.
Now I¹d like to write a test for this w/o actually having to write a file to disk.
All I need is to put an object into a stream encoded as if for saving and then read it back decoded from the same stream.
What¹s the best way to do that? I¹ve chased methods till my eyes hurt and would like help, hopefully from someone who already knows the answer.
Yours in curiosity and service, --Jerome Peace
On the inspector. | rw | rw := RWBinaryOrTextStream with: ''. rw fileOutClass: nil andObject: self . rw inspect
On this new inspector
| morphOrList | self reset .
morphOrList _ self fileInObjectAndCode. (morphOrList isKindOf: SqueakPage) ifTrue: [morphOrList _ morphOrList contentsMorph]. Smalltalk isMorphic ifTrue: [ActiveWorld addMorphsAndModel: morphOrList] ifFalse: [morphOrList isMorph ifFalse: [self inform: 'Can only load a single morph into an mvc project via this mechanism.']. morphOrList openInWorld]
Now you could see how and optimize.
By the way, is very odd see selected Text is changing fonts.
Saludos amigo !
Edgar
squeak-dev@lists.squeakfoundation.org