<div dir="ltr">The become is not absolutely necessary, it's just future proof<br>In Morphics-nice.687<br><br>Item was added:<br>
+ ----- Method: MultiNewParagraph class>>initialize (in category 'class initialization') -----<br>
+ initialize<br>
+ "Prepare our own funeral"<br>
+<br>
+ MultiNewParagraph allInstancesDo:[:mnp| mnp <span class="">becomeForward</span>: (mnp as: NewParagraph)]!<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/3 Chris Muller <span dir="ltr"><<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Actually, Nicolas' advice is what I was looking for. Of course I use<br>
Ma-Serializer but regardless of serializer I am trying to figure out<br>
my process for upgrade. To do that I want to be clear about the<br>
actual before-and-after state of the domain, which parts needing<br>
upgraded and what that upgrade is. And also how it would integrate<br>
into an upgrade process.<br>
<br>
Nicolas seems to be saying the domain change is that any persistent<br>
MultiNewParagraphs need to become equivalent instances of<br>
NewParagraph. I like the idea of moving MultiNewParagraph to<br>
45Deprecated for one release until 4.6.<br>
<br>
What I'm a little unclear about still, how can I create the equivalent<br>
NewParagraph instance to become to?<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, Oct 3, 2013 at 1:01 PM, Bob Arning <<a href="mailto:arning315@comcast.net">arning315@comcast.net</a>> wrote:<br>
> Since Chris has not responded with the particular serialization method<br>
> employed, there's not much real advice to be given. The particular method<br>
> may well have a way to deal with this.<br>
><br>
> Cheers,<br>
> Bob<br>
><br>
><br>
> On 10/3/13 1:48 PM, Nicolas Cellier wrote:<br>
><br>
> We could as well restore an empty MultiNewParagraph in *45Deprecated, then<br>
> let you becomeForward: each MultiNewParagraph into a NewParagraph<br>
><br>
><br>
> 2013/10/3 Bob Arning <<a href="mailto:arning315@comcast.net">arning315@comcast.net</a>><br>
>><br>
>> That's one way. Another is 'save morph in file' from the metamenu.<br>
>> Question is which Chris used.<br>
>><br>
>> On 10/3/13 6:33 AM, Edgar De Cleene wrote:<br>
>><br>
>> On 10/3/13 6:55 AM, "Bob Arning" <<a href="mailto:arning315@comcast.net">arning315@comcast.net</a>> wrote:<br>
>><br>
>> One questions is: how were they serialized?<br>
>><br>
>> Cheers,<br>
>> Bob<br>
>><br>
>><br>
>> Here you have how to exchange serialized objects between Squeak, Pharo and<br>
>> Cuis.<br>
>><br>
>> For Pharo 2.0 you need fileIn ReferenceStream logic first.<br>
>> Drag any .obj into World and you got a Inspector of on it.<br>
>><br>
>> !Object methodsFor: 'objects from disk' stamp: 'edc 9/6/2008 19:40'!<br>
>> fileOutCompressed<br>
>><br>
>> | unzipped zipped buffer aFileName |<br>
>> aFileName := self class name asFileName. "do better?"<br>
>> aFileName := UIManager default<br>
>> request: 'File name?' translated initialAnswer: aFileName.<br>
>> aFileName size == 0 ifTrue: [^ Beeper beep].<br>
>> Cursor write<br>
>> showWhile: [unzipped := RWBinaryOrTextStream on: ''.<br>
>> unzipped fileOutClass: nil andObject: self.<br>
>> unzipped reset.<br>
>> zipped := FileDirectory default newFileNamed: aFileName , 'obz'.<br>
>> zipped binary.<br>
>> zipped := GZipWriteStream on: zipped.<br>
>> buffer := ByteArray new: 50000.<br>
>> 'Compressing ' , self name<br>
>> displayProgressAt: Sensor cursorPoint<br>
>> from: 0<br>
>> to: unzipped size<br>
>> during: [:bar |<br>
>> [unzipped atEnd]<br>
>> whileFalse: [bar value: unzipped position.<br>
>> zipped<br>
>> nextPutAll: (unzipped nextInto: buffer)].<br>
>> zipped close.<br>
>> unzipped close]]! !<br>
>><br>
>> !Object methodsFor: 'objects from disk' stamp: 'edc 6/20/2011 11:41'!<br>
>> saveOnFileNamed: aString<br>
>> "Ask the user for a filename and save myself on a<br>
>> ReferenceStream file. Writes out the version and class structure.<br>
>> The file is fileIn-able. UniClasses will be filed out.<br>
>> This save objects as .obj"<br>
>> | aFileName fileStream |<br>
>> aString isEmpty<br>
>> ifTrue: [^ self error: 'name is missing'].<br>
>> aFileName := aString , '.obj'.<br>
>> fileStream := ReferenceStream fileNamed: aFileName .<br>
>> fileStream nextPut: self.<br>
>> fileStream close.<br>
>> ! !<br>
>><br>
>><br>
>> !Object class methodsFor: 'objects from disk' stamp: 'edc 6/20/2011<br>
>> 12:16'!<br>
>> readAndInspect: inputStream<br>
>> | o rr |<br>
>> rr _ ReferenceStream on: inputStream.<br>
>> o _ rr next.<br>
>> rr close.<br>
>> o inspect! !<br>
>><br>
>> !Object class methodsFor: '*services-extras' stamp: 'edc 2/14/2008 08:24'!<br>
>> fileReaderServicesForFile: fullName suffix: suffix<br>
>> | services |<br>
>> services _ OrderedCollection new.<br>
>><br>
>> (fullName asLowercase endsWith: '.obj')<br>
>> ifTrue: [ services add: self serviceLoadObject ].<br>
>> ^services! !<br>
>><br>
>> !Object class methodsFor: '*services-extras' stamp: 'edc 7/27/2008 08:11'!<br>
>> readCompressedObject: aFileStream<br>
>><br>
>> self readAndInspect: (MultiByteBinaryOrTextStream with:<br>
>> (GZipReadStream<br>
>> on: aFileStream) upToEnd) reset! !<br>
>><br>
>> !Object class methodsFor: '*services-extras' stamp: 'edc 7/27/2008 07:40'!<br>
>> serviceCompressedObject<br>
>> "Answer a service for opening a saved Object"<br>
>> ^ (SimpleServiceEntry<br>
>> provider: Object<br>
>> label: 'gz saved Object'<br>
>> selector: #readCompressedObject:<br>
>> description: 'open a gz Object'<br>
>> buttonLabel: 'object')<br>
>> argumentGetter: [:fileList |<br>
>><br>
>> fileList readOnlyStream]! !<br>
>><br>
>> !Object class methodsFor: '*services-extras' stamp: 'edc 2/14/2008 08:26'!<br>
>> serviceLoadObject<br>
>> "Answer a service for opening a saved Object"<br>
>><br>
>> ^ (SimpleServiceEntry<br>
>> provider: self<br>
>> label: 'saved Object'<br>
>> selector: #readAndInspect:<br>
>> description: 'open a Object'<br>
>> buttonLabel: 'object')<br>
>> argumentGetter: [:fileList | fileList readOnlyStream]! !<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>