Here's the error when adding or using a file directory:
The method SmalltalkImage platformName has been deprecated. Use Smalltalk os platformName RS _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2011/7/8 Robert Sirois <[hidden email]>:
> Here's the error when adding or using a file directory: > The method SmalltalkImage platformName has been deprecated. > Use Smalltalk os platformName That explains what the problem and the solution is. Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Right, I just wasn't sure if this was expected for the newest release or not.
RS > Date: Fri, 8 Jul 2011 12:54:42 +0200 > Subject: Re: [Seaside] File Directory error (Pharo 1.2.1) > From: [hidden email] > To: [hidden email] > > 2011/7/8 Robert Sirois <[hidden email]>: > > Here's the error when adding or using a file directory: > > The method SmalltalkImage platformName has been deprecated. > > Use Smalltalk os platformName > > That explains what the problem and the solution is. > > Cheers > Philippe > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2011/7/8 Robert Sirois <[hidden email]>:
> Right, I just wasn't sure if this was expected for the newest release or > not. If you provide more information (stack trace, versions, …) we may be able to help. Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On 08 Jul 2011, at 18:24, Philippe Marschall wrote: 2011/7/8 Robert Sirois <[hidden email]>:Right, I just wasn't sure if this was expected for the newest release ornot. The error is in Sport2 package More precisely: SpEnvironment>>onWindows It means Sport needs to be updated, but is the new code valid for other Smalltalks? Johan _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
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 ? Thank, Dario
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2011/7/11 [hidden email] <[hidden email]>:
> 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? Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
>> 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? OK, in the default directory ( ....../Contents/Resources) i have 2 file. datiSocietary.sixx cerchio30.jpg 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" self addFileAt: aPath contents: (GRPlatform current contentsOfFile: aPath binary: (self isBinaryAt: aPath)) Ciao, Dario _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2011/7/12 [hidden email] <[hidden email]>:
> >>> 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? > > > OK, > > in the default directory ( ....../Contents/Resources) i have 2 file. Uhm, you're using a "OneClick"-image, right? The whole file io and resources have never been tested on those. > datiSocietary.sixx > > cerchio30.jpg > > > 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 Ok‽ That looks more like a Pharo issue to me. What does the following answer? FileDirectory default entries Can step through the code an check if something differently happens? There are no white spaces or non-ascii characters in the file names involved, are there? > --------------------------------------------------------------------------------------------------------------------------------------------------- > > 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" > self > addFileAt: aPath > contents: (GRPlatform current > contentsOfFile: aPath > binary: (self isBinaryAt: aPath)) Can you try that outside of a OneClick image and see whether it works there? Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi,
some time ago i found a problem when upload one WAFileLibrarySubclass with the command: WAFileLibrarySubclass addAllFilesIn: '/Dati-IST/ISTWork/ImmaginiBase' > >> --------------------------------------------------------------------------------------------------------------------------------------------------- >> >> 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" >> self >> addFileAt: aPath >> contents: (GRPlatform current >> contentsOfFile: aPath >> binary: (self isBinaryAt: aPath)) The error is erase into contentsOfFile: aString binary: aBoolean method by : (FileDirectory default oldFileNamed: aString) answer nil because it open the file in Read-Wriite mode but the file don't have write authorization. > contentsOfFile: aString binary: aBoolean | stream | stream := aBoolean ifTrue: [ (FileDirectory default oldFileNamed: aString) ** at this point binary is sent to nil and error is erase *** binary; yourself ] ifFalse: [ (MultiByteFileStream oldFileNamed: aString) ** at this point binary is sent to nil and error is erase *** ascii; wantsLineEndConversion: true; yourself ]. ^ [ stream contents ] ensure: [ stream close ] I think it's a valid solution change the: oldFileNamed: aString) into: readOnlyFileNamed: aString) for open the file only in read modality. Because: point one : the A) interaction found the files in any case point two : the files can have only read authorization. point three : the contentsOfFile: aString binary: aBoolean is call only by in this step Any other considerations ? Dario _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |