On 31 May 2018, at 17:55, Hilaire <hilaire@drgeo.eu> wrote:
Hi Sven,
Thanks for your in-depth testing.
The code of the test and the one I posted last year is not the exactly same. And if you try it, it fails. May be a supplementary source of failure.
Now with the latest P7 image of today, installing DrGeo fails.
Particularly this enclosed class fails to initialize. It comes with PNG content as ByteArray. I think it is related problems.
It seem there are different syntax changes I don't understand:
This code fails NOW:
PNGReadWriter createAFormFrom: #(137 ... 130) asByteArray
This code succeeds:
PNGReadWriter formFromStream: #[137 ... 130] readStream
Is it expected failure?
That is because that particular method (with no users in the image) uses a deprecated class, change it to the simpler createAFormFrom: data | error f | error := ''. f := [ self formFromStream: data readStream ] ifError: [ :a :b | error := a printString , ' ' , b printString. (StringMorph contents: error) color: Color red; imageForm ]. ^ { f. error } but honestly, why this method and why not directly do self formFromStream: data readStream swallowing errors is so/so, IMHO. Also, the return value is really unusual. You just want the Form, right. It is not the responsibility of a system class to do UI for you, I think.
Hilaire
Le 31/05/2018 à 16:23, Sven Van Caekenberghe a écrit :
Hi Hilaire,
On Pharo 7 build 993 it works on both 32 and 64 bits (macOS):
The patch (#normalize calls here and there) seems to have been integrated as well your test case (#testNewFromSampleBytes), with your name in the comments !
-- Dr. Geo http://drgeo.eu
<DrGLoader.st.zip>