[squeak-dev] The Trunk: MorphicExtras-nice.130.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sat Dec 7 14:27:03 UTC 2013


On one hand, I find those bytes very useful if ever we'd like to recreate
an image.
But on the other hand, it creates a dependency.
This makes a nice packaging problem, how to handle it?
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...
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).


2013/12/7 <commits at source.squeak.org>

> Nicolas Cellier uploaded a new version of MorphicExtras to project The
> Trunk:
> http://source.squeak.org/trunk/MorphicExtras-nice.130.mcz
>
> ==================== Summary ====================
>
> Name: MorphicExtras-nice.130
> Author: nice
> Time: 7 December 2013, 3:18:35 pm
> UUID: f1cfb1fa-c101-4329-b528-963fb90eef45
> Ancestors: MorphicExtras-fbs.129
>
> Some initialization performed once in last century is depending on
> UpdateStream.
>
> =============== Diff against MorphicExtras-fbs.129 ===============
>
> Item was changed:
>   ----- Method: PaintBoxMorph>>loadColorChooser (in category
> 'initialization') -----
>   loadColorChooser
>         "Load Forms for ColorMemoryMorph."
>
>         | doc closedForm openForm |
> +       doc := UpdateStreamDownloader default objectStrmFromUpdates:
> 'colorPalClosed.obj'.
> -       doc := Utilities objectStrmFromUpdates: 'colorPalClosed.obj'.
>         closedForm := doc fileInObjectAndCode mapColor: Color transparent
> to: Color black.
> +       doc := UpdateStreamDownloader default objectStrmFromUpdates:
> 'colorPalOpen.obj'.
> -       doc := Utilities objectStrmFromUpdates: 'colorPalOpen.obj'.
>         openForm := doc fileInObjectAndCode mapColor: Color transparent
> to: Color black.
>
>         colorMemoryThin image: closedForm.
>         colorMemoryThin position: self position + (0 at 140).
>
>         colorMemory delete.     "delete old one"
>         colorMemory := PaintBoxColorPicker new image: openForm.
>   !
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20131207/003f44d4/attachment.htm


More information about the Squeak-dev mailing list