[Seaside] File Directory error (Pharo 1.2.1)

dtrussardi at tiscali.it dtrussardi at tiscali.it
Tue Jul 12 08:40:19 UTC 2011

>> My environment is based on Pharo 1-0 and Seaside 3.0.0-alpha5.15,  run on
>> MacBook.
>> When i work with File Library   addAllFilesIn: addFileAt: methods
>> the system erase the error:
>> MessageNotUnderstood: receiver of "binary" is nil
>> Relative specific method is
>> contentsOfFile: aString binary: aBoolean | stream | stream := aBoolean
>> ifTrue: [ (FileDirectory default oldFileNamed: aString) binary; yourself ]
>> ifFalse: [ (MultiByteFileStream oldFileNamed: aString) ascii;
>> wantsLineEndConversion: true; yourself ]. ^[ stream contents ] ensure: [
>> stream close ].
>> I think is the same problem relative to FileDirectory .
>> Any idea for  solve the problem ?
> Can you experiment at bit? If you do
> FileDirectory default oldFileNamed: aString
> what do you get? Does the file actually exist?


	in the default directory ( ....../Contents/Resources)  i have 2 file.



FileDirectory default oldFileNamed: 'datiSocietari.sixx'

	answer an :		 MultiByteFileStream: '/users/dtr/GemTools-1.0b6.app/Contents/Resources/datiSocietari.sixx'

FileDirectory default oldFileNamed: 'cerchio30.jpg'

	answer 		nil


File Library notes

A) when  i do the		WAFileLibrarySubclass	addAllFilesIn:	 '/Dati-IST/ISTWork/ImmaginiBase'

the method  do loop on files in the path .

	addAllFilesIn: aPathString 
	"adds all files in the directory specified by aPathString to the current file library"

	**** THIS LOOP WORK FINE.  The files  exist. ****
	(GRPlatform current filesIn: aPathString) do: [ :each | self addFileAt: each ]

B) The error is in the action  do on the specific interaction:

	addFileAt: aPath 
	"adds the file specified by aFilename to the current file library"
		addFileAt: aPath
		contents: (GRPlatform current 
				contentsOfFile: aPath
				binary: (self isBinaryAt: aPath))



More information about the seaside mailing list