Thanks Bob!
fullPrintString was the solution.
MIDI files working full size also :)
TYVM ken
________________________________ From: Bob Arning arning315@comcast.net To: squeak-dev@lists.squeakfoundation.org Sent: Saturday, August 31, 2013 2:44 AM Subject: Re: [squeak-dev] FileStream size limitation?
The "...etc..." part is a limitation in the implementation of #printString, which get called by #asString here. The goal is *not* to put huge amounts of data into the Transcript or other simple UI elements where it might be unwieldy. If you really want the full thing printed out, use
myBigOrderedCollection printStringLimitedTo: 99999999
or
myBigOrderedCollection fullPrintString
Cheers, Bob
On 8/31/13 4:49 AM, Squeak List wrote:
Hello,
I have an OrderedCollection with 24,576 elements.
A bunch of musical notes basically: each of the 24,576 elements is like:
#('eo6' 0.25 500)
for example.
Goal: I would like to turn that *entire* OrderedCollection into a single MIDI file.
However, there seems to be some sort of size limitation that I do not see how to get around.
- Even before getting to the MIDI part, I tried:
FileStream fileNamed: '1-24576.rtf' do: [:stream | stream nextPutAll: ((oc copyFrom: 1 to:24576)
asString)].
which creates a nice file of 48.8KB size. And opening the file, it ends with:
#('c#o6' 0.25 500) #('d...etc... which is not what I expected.
- If I do:
FileStream fileNamed: '1-2729.rtf' do: [:stream | stream nextPutAll: ((oc copyFrom: 1 to:2729)
asString)].
it works fine: ending tidily with the expected: #('c#o6' 0.25 500))
- But,
FileStream fileNamed: '1-2730.rtf' do: [:stream | stream nextPutAll: ((oc copyFrom: 1 to:2730)
asString)].
is where this starts:
#('c#o6' 0.25 500) #('d...etc...
This exact same problem happens when making MIDI files: there seems to be a size limitation around 48.8KB.
Aside from MIDI, is FileStream just the wrong class to use for anything larger than creating a 48.8kb text file (.txt or .rtf)? Or how can I get around this restriction?
Any suggestions are most welcome.
Thanks, ken
Windows 7 - 64 bit
Squeak4.4 latest update: #12319 Current Change Set: Unnamed Image format 6505 (32 bit)
Squeak.exe Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.331] Win32 built on Aug 22 2013 10:20:54 Compiler: 3.4.4 (cygming
special, gdc 0.12, using dmd 0.125)
platform sources revision VM: r2776