<div dir="ltr"><div><div><div><div><div><div><div><div>A few things:<br></div>1) PaintBoxMorph new is cloning a Prototype much like the self way.<br></div>2) above code is memorizing how the prototype was once initialized.<br>
</div><div>2.a) it will never be invoked again, unless we recreate a whole image <br></div>2.b) it does so partially... It does tell which file, but not from which server.<br></div>The information of well known update server is no more in the image.<br>
You could find <a href="http://ftp.squeak.org">ftp.squeak.org</a> recently in Utilities before I removed the class var...<br>... but <a href="http://ftp.squeak.org">ftp.squeak.org</a> doesn&#39;t seem to know about colorPalClosed.obj.<br>
</div>3) I don&#39;t see an updateStream dependency in Installer core, only a dependency on its successor MCMcmUpdater<br><br></div>2.a) makes me think we don&#39;t need something complex.<br></div>2.b) makes me think it&#39;s time to replace/update the initialize mechanism<br>
<br></div>I looked at the cached images, it&#39;s about 35kbytes, 16kBytes zipped.<br>A possible alternative is to directly store those bytes in some literal (string -&gt; uudecode -&gt; unzip -&gt; bits).<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/12/8 Chris Muller <span dir="ltr">&lt;<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Sun, Dec 8, 2013 at 2:48 PM, Nicolas Cellier<br>
&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt; wrote:<br>
&gt; Well, above code depends on some bytes left on some file on the internet,<br>
<br>
</div>Not necessarily.  See Installer class&gt;&gt;#airplaneMode.<br>
<br>
Besides, even if it did, it&#39;s 2013 so developers are accustomed to<br>
working with remote code repositories.<br>
<div class="im"><br>
&gt; plus a bunch of methods to retrieve/decode/install those bytes as an image.<br>
<br>
</div>Which is a requirement of #core.  See comment for Installer&gt;&gt;#core.<br>
<div class="im"><br>
&gt; We could as well imagine a shorter path...<br>
<br>
</div>Like what?<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
&gt; 2013/12/8 Chris Muller &lt;<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; MorphicExtras is &quot;extras&quot; so we can expect it to depend on myriad<br>
&gt;&gt; other packages.  I&#39;m surprised you and Frank aren&#39;t harping on such a<br>
&gt;&gt; &quot;catch-all&quot; package.<br>
&gt;&gt;<br>
&gt;&gt; I thought to test the waters of making it a dynamic-dependency.<br>
&gt;&gt;<br>
&gt;&gt; On Sat, Dec 7, 2013 at 8:27 AM, Nicolas Cellier<br>
&gt;&gt; &lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; On one hand, I find those bytes very useful if ever we&#39;d like to<br>
&gt;&gt; &gt; recreate an<br>
&gt;&gt; &gt; image.<br>
&gt;&gt; &gt; But on the other hand, it creates a dependency.<br>
&gt;&gt; &gt; This makes a nice packaging problem, how to handle it?<br>
&gt;&gt; &gt; One possibility would be to encode image data in some kind of literal<br>
&gt;&gt; &gt; (packed string, byte array, ...), and store &amp; decode this literal in<br>
&gt;&gt; &gt; some<br>
&gt;&gt; &gt; class initialization method...<br>
&gt;&gt; &gt; Anyway, the name and location of file does not bring much value now<br>
&gt;&gt; &gt; (just<br>
&gt;&gt; &gt; save a few bytes by avoiding duplication of image in a literal).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 2013/12/7 &lt;<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; Nicolas Cellier uploaded a new version of MorphicExtras to project The<br>
&gt;&gt; &gt;&gt; Trunk:<br>
&gt;&gt; &gt;&gt; <a href="http://source.squeak.org/trunk/MorphicExtras-nice.130.mcz" target="_blank">http://source.squeak.org/trunk/MorphicExtras-nice.130.mcz</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; ==================== Summary ====================<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Name: MorphicExtras-nice.130<br>
&gt;&gt; &gt;&gt; Author: nice<br>
&gt;&gt; &gt;&gt; Time: 7 December 2013, 3:18:35 pm<br>
&gt;&gt; &gt;&gt; UUID: f1cfb1fa-c101-4329-b528-963fb90eef45<br>
&gt;&gt; &gt;&gt; Ancestors: MorphicExtras-fbs.129<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Some initialization performed once in last century is depending on<br>
&gt;&gt; &gt;&gt; UpdateStream.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; =============== Diff against MorphicExtras-fbs.129 ===============<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Item was changed:<br>
&gt;&gt; &gt;&gt;   ----- Method: PaintBoxMorph&gt;&gt;loadColorChooser (in category<br>
&gt;&gt; &gt;&gt; &#39;initialization&#39;) -----<br>
&gt;&gt; &gt;&gt;   loadColorChooser<br>
&gt;&gt; &gt;&gt;         &quot;Load Forms for ColorMemoryMorph.&quot;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;         | doc closedForm openForm |<br>
&gt;&gt; &gt;&gt; +       doc := UpdateStreamDownloader default objectStrmFromUpdates:<br>
&gt;&gt; &gt;&gt; &#39;colorPalClosed.obj&#39;.<br>
&gt;&gt; &gt;&gt; -       doc := Utilities objectStrmFromUpdates: &#39;colorPalClosed.obj&#39;.<br>
&gt;&gt; &gt;&gt;         closedForm := doc fileInObjectAndCode mapColor: Color<br>
&gt;&gt; &gt;&gt; transparent<br>
&gt;&gt; &gt;&gt; to: Color black.<br>
&gt;&gt; &gt;&gt; +       doc := UpdateStreamDownloader default objectStrmFromUpdates:<br>
&gt;&gt; &gt;&gt; &#39;colorPalOpen.obj&#39;.<br>
&gt;&gt; &gt;&gt; -       doc := Utilities objectStrmFromUpdates: &#39;colorPalOpen.obj&#39;.<br>
&gt;&gt; &gt;&gt;         openForm := doc fileInObjectAndCode mapColor: Color transparent<br>
&gt;&gt; &gt;&gt; to: Color black.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;         colorMemoryThin image: closedForm.<br>
&gt;&gt; &gt;&gt;         colorMemoryThin position: self position + (0@140).<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;         colorMemory delete.     &quot;delete old one&quot;<br>
&gt;&gt; &gt;&gt;         colorMemory := PaintBoxColorPicker new image: openForm.<br>
&gt;&gt; &gt;&gt;   !<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
</div></div></blockquote></div><br></div>