Concatenating binary files?
Jimmie Houchin
jhouchin at texoma.net
Mon Mar 31 22:51:16 UTC 2003
Ned Konz wrote:
> On Monday 31 March 2003 02:10 pm, Jimmie Houchin wrote:
>>Hello Ned,
>>
>>Thanks for the reply. I'll study your comments and learn. :)
>>Nice to know I'm doing to much work.
>>
>>I tried your code and it got an MNU: binary.
>>
>>I banged my head into that earlier too. I don't understand why it
>>didn't understand the #binary message?
>
> Because it was the wrong type of object to be sending a #binary to
> (#binary wasn't defined for that object's class).
That's what I don't understand. When I browse the StandardFileStream
class I see the #binary message.
My bad. (After attempting again...)
I failed to edit the email end of of lines on the fileDir. So I guess
this cause the StandardFileStream to fail initialization? Nevertheless,
when I corrected it your code worked with the exception of the MNU:
close on 'wave2'. According to the debugger it was a 'aByteArray'. I
imagine I can remove the close messages for wave1 and wave2.
>> My skills with the debugger are non-existent.
>
> Tim's suggestions are very good, especially if you don't want to read
> the entire file into memory.
>
> But you really should learn to use the debugger; it'll save you lots
> of time. You can even fix a method and continue your program in many
> cases.
I always click on 'debug' sometimes I do learn why my code fails.
Sometimes I just learn I don't know very much. :)
I regularly learn I didn't place a '.' at the end of a statement.
> If you just pop up the debugger, it'll show you the call stack. You
> can click on the various stack frames (the topmost list) and see
> where you are in each method.
>
> You can also examine variables.
>
> So in this case it would be good to find out what didn't understand
> #binary.
When I am the debugger window for this code it shows the 'wave...'
variables to be 'nil'. I guess this goes back to a failed initialization
I spoke of above.
Thanks again for your help. I am getting an education. :)
Jimmie Houchin
More information about the Squeak-dev
mailing list
|