<div dir="ltr"><div>This one is also to be removed please...<br></div>Sorry for the noise.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-20 22:37 GMT+02:00  <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt;</span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nicolas Cellier uploaded a new version of Morphic to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Morphic-nice.735.mcz" target="_blank">http://source.squeak.org/trunk/Morphic-nice.735.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-nice.735<br>
Author: nice<br>
Time: 20 July 2014, 10:36:28.157 pm<br>
UUID: add43698-a89f-480a-9bc6-9f8bac49558a<br>
Ancestors: Morphic-cmm.734<br>
<br>
Don&#39;t use RWBinaryOrTextStream where a simple WriteStream would perfectly do the job.<br>
<br>
=============== Diff against Morphic-cmm.734 ===============<br>
<br>
Item was changed:<br>
  ----- Method: MorphicProject class&gt;&gt;compileNewDefaultBackgroundFrom: (in category &#39;utilities&#39;) -----<br>
  compileNewDefaultBackgroundFrom: aForm<br>
        &quot;Compile a new #defaultBackgroundForm method in this class-side which uses aForm as the background.&quot;<br>
+       | formStream base64 |<br>
+       formStream := ByteArray new writeStream.<br>
-       | formStream base64Stream |<br>
-       formStream := RWBinaryOrTextStream on: ByteArray new.<br>
        PNGReadWriter<br>
                putForm: aForm<br>
                onStream: formStream.<br>
+       base64 := formStream base64Encoded.<br>
-       base64Stream := Base64MimeConverter mimeEncode: formStream.<br>
        self class<br>
                compile:<br>
                        (String streamContents:<br>
                                [ : stream | stream<br>
                                         nextPutAll: &#39;defaultBackgroundForm<br>
        ^ Form fromBinaryStream: &#39; ;<br>
                                         nextPut: $&#39; ;<br>
+                                        nextPutAll: base64 ;<br>
-                                        nextPutAll: base64Stream contents ;<br>
                                         nextPut: $&#39; ;<br>
                                        nextPutAll: &#39; base64Decoded asByteArray readStream&#39; ])<br>
                classified: &#39;class initialization&#39;!<br>
<br>
Item was changed:<br>
  ----- Method: TextMorph&gt;&gt;getAllButFirstCharacter (in category &#39;scripting access&#39;) -----<br>
  getAllButFirstCharacter<br>
        &quot;Obtain all but the first character from the receiver; if that would be empty, return a black dot&quot;<br>
<br>
        | aString |<br>
+       ^ (aString := text string) size &gt; 1 ifTrue: [aString copyFrom: 2 to: aString size] ifFalse: [&#39;·&#39;]!<br>
-       ^ (aString := text string) size &gt; 1 ifTrue: [aString copyFrom: 2 to: aString size] ifFalse: [&#39;·&#39;]!<br>
<br>
Item was changed:<br>
  ----- Method: TextMorph&gt;&gt;getFirstCharacter (in category &#39;accessing&#39;) -----<br>
  getFirstCharacter<br>
        &quot;obtain the first character from the receiver if it is empty, return a<br>
        black dot&quot;<br>
        | aString |<br>
        ^ (aString := text string) isEmpty<br>
+               ifTrue: [&#39;·&#39;]<br>
-               ifTrue: [&#39;·&#39;]<br>
                ifFalse: [aString first asString] !<br>
<br>
Item was changed:<br>
  ----- Method: TextMorph&gt;&gt;getLastCharacter (in category &#39;accessing&#39;) -----<br>
  getLastCharacter<br>
        &quot;obtain the last character from the receiver if it is empty, return a black dot&quot;<br>
<br>
        | aString |<br>
+       ^ (aString := text string) size &gt; 0 ifTrue: [aString last asString] ifFalse: [&#39;·&#39;]!<br>
-       ^ (aString := text string) size &gt; 0 ifTrue: [aString last asString] ifFalse: [&#39;·&#39;]!<br>
<br>
Item was changed:<br>
  ----- Method: TextMorph&gt;&gt;setAllButFirstCharacter: (in category &#39;scripting access&#39;) -----<br>
  setAllButFirstCharacter: source<br>
        &quot;Set all but the first char of the receiver to the source&quot;<br>
        | aChar chars |<br>
        aChar := source asCharacter.<br>
        (chars := self getCharacters) isEmpty<br>
+               ifTrue: [self newContents: &#39;·&#39; , source asString]<br>
-               ifTrue: [self newContents: &#39;·&#39; , source asString]<br>
                ifFalse: [chars first = aChar<br>
                                ifFalse: [&quot;&quot;<br>
                                        self<br>
                                                newContents: (String<br>
                                                                streamContents: [:aStream |<br>
                                                                        aStream nextPut: chars first.<br>
                                                                        aStream nextPutAll: source])]] !<br>
<br>
Item was changed:<br>
  ----- Method: TheWorldMenu class&gt;&gt;loadSqueakMap (in category &#39;open-menu registry&#39;) -----<br>
  loadSqueakMap<br>
+       &quot;Load the externally-maintained SqueakMap package if it is not already loaded.  Based on code by Göran Hultgren&quot;<br>
-       &quot;Load the externally-maintained SqueakMap package if it is not already loaded.  Based on code by Göran Hultgren&quot;<br>
<br>
        | server |<br>
        Socket initializeNetwork.<br>
        server := #(&#39;<a href="http://map1.squeakfoundation.org" target="_blank">map1.squeakfoundation.org</a>&#39; &#39;<a href="http://map2.squeakfoundation.org" target="_blank">map2.squeakfoundation.org</a>&#39; &#39;<a href="http://map.squeak.org" target="_blank">map.squeak.org</a>&#39; &#39;<a href="http://map.bluefish.se" target="_blank">map.bluefish.se</a>&#39; &#39;<a href="http://marvin.bluefish.se:8000" target="_blank">marvin.bluefish.se:8000</a>&#39;)<br>

                detect: [:srv | | addr answer |<br>
                        addr := NetNameResolver addressForName: (srv upTo: $:) timeout: 5.<br>
                        addr notNil and: [<br>
                                answer := HTTPSocket httpGet: (&#39;http://&#39;, srv, &#39;/sm/ping&#39;).<br>
                                answer isString not and: [answer contents = &#39;pong&#39;]]]<br>
                ifNone: [^ self inform: &#39;Sorry, no SqueakMap master server responding.&#39;].<br>
        server ifNotNil: [&quot;Ok, found an SqueakMap server&quot;<br>
                ChangeSet newChangesFromStream:<br>
                        (((&#39;http://&#39;, server, &#39;/sm/packagebyname/squeakmap/downloadurl&#39;)<br>
                        asUrl retrieveContents content) asUrl retrieveContents content unzipped<br>
                        readStream)<br>
                named: &#39;SqueakMap&#39;]!<br>
<br>
<br>
</blockquote></div><br></div>