<div dir="ltr">I feel like it would be better to change pixelValueAt: so as to always unhibernate, but I did not dare if ever someone had the idea of sending it in tight loops (one shouldn&#39;t, there is BitBlt for that purpose, but who knows...).<br>
<br>Maybe we could fail primitivePixelValueAt if receiver is Byte like, and unhibernate in fallback code.<br>We would let every other BitBlt primitives accept a ByteArray to allow BitBlt tricks.<br><br>Thoughts?<br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/13  <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 MorphicExtras to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/MorphicExtras-nice.137.mcz" target="_blank">http://source.squeak.org/trunk/MorphicExtras-nice.137.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: MorphicExtras-nice.137<br>
Author: nice<br>
Time: 13 December 2013, 10:07:57.316 pm<br>
UUID: 127ce68e-b210-42a3-b0b3-b40c69941d02<br>
Ancestors: MorphicExtras-nice.136<br>
<br>
Correct an awfull bug in PaintBoxMorph&gt;&gt;showColor<br>
One should NEVER send pixelValueAt: nor colorAt: to an hibernated Form (or ColorForm).<br>
<br>
=============== Diff against MorphicExtras-nice.136 ===============<br>
<br>
Item was changed:<br>
  ----- Method: PaintBoxMorph&gt;&gt;showColor (in category &#39;actions&#39;) -----<br>
  showColor<br>
        &quot;Display the current color in all brushes, both on and off.&quot;<br>
<br>
        | offIndex onIndex center |<br>
        currentColor ifNil: [^self].<br>
        &quot;colorPatch color: currentColor.        May delete later&quot;<br>
        (brushes isNil or: [brushes first owner ~~ self])<br>
                ifTrue:<br>
                        [brushes := OrderedCollection new.<br>
                        #(#brush1: #brush2: #brush3: #brush4: #brush5: #brush6:)<br>
                                do: [:sel | brushes addLast: (self submorphNamed: sel)]].<br>
+       brushes last offImage unhibernate.<br>
+       brushes last onImage unhibernate.<br>
+       brushes last pressedImage unhibernate.<br>
+       center := brushes last offImage extent // 2.<br>
+       offIndex := brushes last offImage pixelValueAt: center.<br>
+       onIndex := brushes last onImage pixelValueAt: center.<br>
-       center := (brushes sixth) offImage extent // 2.<br>
-       offIndex := (brushes sixth) offImage pixelValueAt: center.<br>
-       onIndex := (brushes sixth) onImage pixelValueAt: center.<br>
        brushes do:<br>
                        [:bb |<br>
                        bb offImage colors at: offIndex + 1 put: currentColor.<br>
                        bb offImage clearColormapCache.<br>
                        bb onImage colors at: onIndex + 1 put: currentColor.<br>
                        bb onImage clearColormapCache.<br>
                        bb invalidRect: bb bounds].<br>
        self invalidRect: (brushes first topLeft rect: brushes last bottomRight)!<br>
<br>
<br>
</blockquote></div><br></div>