<div dir="ltr"><div>On one hand, I find those bytes very useful if ever we'd like to recreate an image.<br>But on the other hand, it creates a dependency.<br>This makes a nice packaging problem, how to handle it?<br></div>
One possibility would be to encode image data in some kind of literal (packed string, byte array, ...), and store & decode this literal in some class initialization method...<br>Anyway, the name and location of file does not bring much value now (just save a few bytes by avoiding duplication of image in a literal).<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/7 <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></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 MorphicExtras to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/MorphicExtras-nice.130.mcz" target="_blank">http://source.squeak.org/trunk/MorphicExtras-nice.130.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: MorphicExtras-nice.130<br>
Author: nice<br>
Time: 7 December 2013, 3:18:35 pm<br>
UUID: f1cfb1fa-c101-4329-b528-963fb90eef45<br>
Ancestors: MorphicExtras-fbs.129<br>
<br>
Some initialization performed once in last century is depending on UpdateStream.<br>
<br>
=============== Diff against MorphicExtras-fbs.129 ===============<br>
<br>
Item was changed:<br>
----- Method: PaintBoxMorph>>loadColorChooser (in category 'initialization') -----<br>
loadColorChooser<br>
"Load Forms for ColorMemoryMorph."<br>
<br>
| doc closedForm openForm |<br>
+ doc := UpdateStreamDownloader default objectStrmFromUpdates: 'colorPalClosed.obj'.<br>
- doc := Utilities objectStrmFromUpdates: 'colorPalClosed.obj'.<br>
closedForm := doc fileInObjectAndCode mapColor: Color transparent to: Color black.<br>
+ doc := UpdateStreamDownloader default objectStrmFromUpdates: 'colorPalOpen.obj'.<br>
- doc := Utilities objectStrmFromUpdates: 'colorPalOpen.obj'.<br>
openForm := doc fileInObjectAndCode mapColor: Color transparent to: Color black.<br>
<br>
colorMemoryThin image: closedForm.<br>
colorMemoryThin position: self position + (0@140).<br>
<br>
colorMemory delete. "delete old one"<br>
colorMemory := PaintBoxColorPicker new image: openForm.<br>
!<br>
<br>
<br>
</blockquote></div><br></div>