Help with multiByteFileStream
stéphane ducasse
ducasse at iam.unibe.ch
Sat Feb 26 20:43:50 UTC 2005
Hi
I'm porting my env to 3.8 and I have the following problem (which
worked like a charm in 3.7).
The loadImage: method normally load a form store in a file.
loadImage: aString
"Load an image from a file and install it as new graphics"
| stream res |
stream := FileStream readOnlyFileNamed: aString, '.frm'.
res := Compiler new evaluate: stream in: nil to: nil notifying: nil
ifFail: [nil].
res isNil
ifTrue: [PopUpMenu inform: 'Problem with the file ', aString, '.frm']
ifFalse: [(res isKindOf: Form)
ifTrue: [self image: res]]
the file is of this form:
(Form
extent: 70 at 78
depth: 16
fromArray: #( 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0....... 0 0)
offset: 0 at 0)
Apparently now the res := Compiler new evaluate: stream in: nil to: nil
notifying: nil ifFail: [nil].
returns nil when the stream is a MultiByteFileStream
So what is the best way to obtain an stream working the old way?
Stef
More information about the Squeak-dev
mailing list
|