<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 22 nov. 2022 à 14:01, Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de">marcel.taeumel@hpi.de</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id="m_-6134413766341790879__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0);text-align:left" dir="ltr">
                                        Hi Eliot --<div><br></div><div>> <span style="font-family:Arial,Helvetica,sans-serif;font-size:10pt">The test worked second time for me ...</span></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:10pt"><br></span></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:10pt">Well, you wrote a test that does not account for the example I provided in my first e-mail. ;-) Maybe I used the wrong API. I combined #nextPut: with #nextArray. Looks reasonable to me.</span></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:10pt"><br></span></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:10pt">The code in DataStreamTest looks scary: #testObject: #get: #put: #unStream: #</span><span style="font-family:Arial,Helvetica,sans-serif"><span style="font-size:13.3333px">streamedRepresentationOf: ... oh my ...</span></span></div><div><span style="font-family:Arial,Helvetica,sans-serif"><span style="font-size:13.3333px"><br></span></span></div></div></blockquote><div><br></div><div>Well, you have used readArray which is marked as private in comment, and will fail because we did not write an Array...</div><div>(i would recommend to classify those methods in a private category/protocol)<br></div><div>The example should use next instead, in which case it works for me.<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id="m_-6134413766341790879__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0);text-align:left" dir="ltr"><div><span style="font-family:Arial,Helvetica,sans-serif"><span style="font-size:13.3333px"></span></span></div><div><span style="font-family:Arial,Helvetica,sans-serif"><span style="font-size:13.3333px">Best,</span></span></div><div><span style="font-family:Arial,Helvetica,sans-serif"><span style="font-size:13.3333px">Marcel</span></span></div><div></div>
                                        <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px;min-width:500px">
                        <p style="color:rgb(170,170,170);margin-top:10px">Am 22.11.2022 13:57:19 schrieb Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<div dir="ltr"><div dir="ltr"><div style="font-size:10pt"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 22, 2022 at 4:54 AM Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de" target="_blank">marcel.taeumel@hpi.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;min-width:500px"><div id="m_-6134413766341790879m_-4076693365959221840__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0);text-align:left" dir="ltr">
                                        Hi Eliot --<div><br></div><div>> <span style="font-family:Arial,Helvetica,sans-serif;font-size:10pt">Write a test :-)</span></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:10pt"><br></span></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:10pt">My image freezes. It seems totally broken. That's why I asked. I wanted to learn more about the expected behavior. After that, I could write a test. ;-)</span></div></div></blockquote><div><br></div><div style="font-size:10pt">Interesting! The test worked second time for me (I used "instance first class = Color", which is false since in that case "instance first class = TransparentColor :-) ). That's 64 bits macOS.</div><div style="font-size:10pt"><br></div><div style="font-size:10pt">Are you seeing this on 32-bit Windows? or...?</div><div style="font-size:10pt"><br></div><div style="font-size:10pt"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;min-width:500px"><div id="m_-6134413766341790879m_-4076693365959221840__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0);text-align:left" dir="ltr"><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:10pt"><br></span></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:10pt">Best,</span></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:10pt">Marcel</span></div><div></div>
                                        <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px;min-width:500px">
                        <p style="color:rgb(170,170,170);margin-top:10px">Am 22.11.2022 13:50:30 schrieb Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<div dir="ltr"><div dir="ltr"><div style="font-size:10pt">Hi Marcel,<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 22, 2022 at 1:58 AM Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de" target="_blank">marcel.taeumel@hpi.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;min-width:500px"><div id="m_-6134413766341790879m_-4076693365959221840m_-5008758099522280910__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0);text-align:left" dir="ltr">Hi all --<div></div><div><br></div><div>Should the following work?</div><div><br></div><div><div><span style="font-size:13.3333px">class := DoubleByteArray.</span></div><div><span style="font-size:13.3333px">size := 10.</span></div><div><span style="font-size:13.3333px">dummy := 123.</span></div><div><span style="font-size:13.3333px"><br></span></div><div><span style="font-size:13.3333px">array := class new: size.</span></div><div><span style="font-size:13.3333px">array  atAllPut: dummy.</span></div><div><span style="font-size:13.3333px"><br></span></div><div><span style="font-size:13.3333px">(DataStream newFileNamed: 'numbers')</span></div><div><span style="font-size:13.3333px"><span style="white-space:pre-wrap"> </span>nextPut: array;</span></div><div><span style="font-size:13.3333px"><span style="white-space:pre-wrap">   </span>close.</span></div><div><span style="font-size:13.3333px"><br></span></div><div><span style="font-size:13.3333px">stream := DataStream fileNamed: 'numbers'. </span></div><div><span style="font-size:13.3333px">load := stream readArray.</span></div><div><span style="font-size:13.3333px">stream close.</span></div><div><span style="font-size:13.3333px">load explore</span></div></div></div></blockquote><div><br></div><div style="font-size:10pt">Write a test :-)</div><div style="font-size:10pt"><br></div><div style="font-size:10pt">testRawBits<br>    ((RawBitsArray subclasses reject: #isAbstract), ((RawBitsArray subclasses select: #isAbstract) collect: #subclasses)) flatten do:<br>        [:class| | instance |<br>        instance := class new: 10.<br>        instance first isColor<br>            ifTrue:<br>                [1 to: instance size do: [:i| instance at: i put: (Color r: i * 1 g: i * 2 b: i * 3)]]<br>            ifFalse:<br>                [1 to: instance size do: [:i| instance at: i put: i]].<br>        self assert: instance equals: (self testObject: instance) description: 'A ', class name, ' should be serializable']<br></div><div style="font-size:10pt"><br></div><div style="font-size:10pt">see Tests-eem.494</div><div style="font-size:10pt"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;min-width:500px"><div id="m_-6134413766341790879m_-4076693365959221840m_-5008758099522280910__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0);text-align:left" dir="ltr"><div><br></div><div>Best,</div><div>Marcel</div></div><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><span style="font-size:10pt;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div>
</div></blockquote></div><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><span style="font-size:10pt;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div>
</div></blockquote></div><br>
</blockquote></div></div>