Hola 

En la clase StdioFileStream tenes el mensaje  :

StdioFileStream >>read: aString text: aBoolean 
    "Answer an instance of the receiver whose future sequence values consist
    of the contents of the file named, aString, and whose access is character
    based or binary, depending on the <boolean> argument. Raise an exception
    if the file does not exist."

  ^self basicNew 
        setStream: (CRTLibrary default fopen: aString
                mode: (aBoolean ifTrue: ['rt'] ifFalse: ['rb']))
        isText: aBoolean
        name: aString

El comment dice que levanta una excepción si el archivo no existe, pero lo que 
levanta nada tiene que ver con la  no existencia del archivo:

 11:40:49, miércoles, 28 de julio de 2010: 'UndefinedObject does not understand 
#asExternalHandle'
Object>>doesNotUnderstand:
StdioFileStream>>setStream:isText:name:
StdioFileStream class>>read:text:
StdioFileStream class>>read:

StdioFileStream >>setStream: anExternalAddress isText: aBoolean name: aString 
    stream := anExternalAddress asExternalHandle.
    isText := aBoolean.
    name := aString.
    self beFinalizable


No es mejor que primero verifique la existencia del archivo y luego proceda ?
Es un error de codificación o estoy errado ?

saludos kiko






      

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]

http://www.clubSmalltalk.org

Responder a