<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font face="Georgia">or, with a little less arcane stuff:<br>
      <br>
      <br>
      | myObject rs |<br>
      myObject := MethodReference asClassDefinition.<br>
      rs _ ReferenceStream on: (RWBinaryOrTextStream on: ByteArray new).<br>
      rs nextPut: myObject.<br>
      (ReferenceStream on: (ReadStream on: rs contents)) next<br>
      <br>
      Cheers,<br>
      Bob<br>
      <br>
    </font>
    <div class="moz-cite-prefix">On 9/7/13 1:33 PM, Chris Muller wrote:<br>
    </div>
    <blockquote
cite="mid:CANzdToE-7=WbrxFZuVJXLbszqxsmWd8G4fPfaPK6p7L4_Qujvw@mail.gmail.com"
      type="cite">
      <pre wrap="">I just noticed 'browse class versions' is still not working with the
new-and-improved SqueakSource prototype because maybe there's a bug
with serializing an object to/from a ByteArray with Squeak?

I had wanted to use MultiByteBinaryOrTextStream to serialize to a
ByteArray, but when I try this:

| ba myObject |
myObject := MethodReference asClassDefinition.
ba :=  ((ReferenceStream on: (MultiByteBinaryOrTextStream on: ByteArray new))
     nextPut: myObject ;
     yourself) contents.
(ReferenceStream on: (MultiByteBinaryOrTextStream on: ba)) next

Produces an error:  'The file did not exist in this directory'.   Huh?
 What file?  What directory?

I've only ever used my own serializer since about 2004, which I think
is much better but obviously for in-image stuff I have to use
ReferenceStream.

Any help would be greatly appreciated.


</pre>
    </blockquote>
    <br>
  </body>
</html>