[BUG] Fetch Documentation blows up
Ned Konz
ned at bike-nomad.com
Fri Feb 2 00:50:51 UTC 2001
I tried the "fetch Documentation" Class List menu choice from a browser, just
to see what happened...
I get a DNU:
MessageNotUnderstood: nextPutAll:
UndefinedObject(Object)>>doesNotUnderstand:
DocLibrary>>cache:as:
[] in DocLibrary>>docObjectAt:
OrderedCollection>>do:
DocLibrary>>docObjectAt:
DocLibrary>>openDocAt:
DocLibrary>>fetchDocSel:class:
Browser>>fetchClassDocPane
This is from the expression
(local fileNamed: fileName)
in DocLibrary>>cache:as: returning nil.
I have the latest 2.9 updates in my image.
My DocPaneCache is set to 'file://home/ned/Squeak/docPaneCache/', which is a
directory that exists.
My working directory is /home/ned/Squeak/2.9
It is trying to find a file named ClassName.0.sp (where ClassName is the name
of the currently selected class).
The filename logic in ServerDirectory seems to be trying to construct a file
named /home/ned/Squeak/docPaneCache/home/ned/Squeak/2.9/ClassName.0.sp
which isn't right.
Also, I noticed that FileUrl>>copy does not do a proper deep copy; instead,
it shares the path with its new copy. So
The data that it wants to store there is the HTML text of a 404 Not Found
message, but I was curious as to whether or not this could be used for local
documentation.
Here's what I noticed upon debugging through the code in a workspace:
s _ ServerDirectory new fullPath: 'file://home/ned/Squeak/docPaneCache/'.
f _ s fileNamed: 'PicAssembler.0.sp'. "returns nil"
So I traced into the code.
in ServerDirectory>>fileNamed:, I see this code:
(self is ServerDirectory<file://home/ned/Squeak/docPaneCache/> )
file _ self asServerFileNamed: fullName.
file is now ServerFile<file://home/ned/Squeak/docPaneCache/PicAssembler.0.sp>,
but self has also been changed to be:
ServerDirectory<file://home/ned/Squeak/docPaneCache/PicAssembler.0.sp>
This is because FileUrl>>copy just does a shallowCopy (leaving its path
collection shared).
file readWrite.
ok
file isTypeFile
ok, this is true.
ifTrue: [
^ FileStream fileNamed: (file fileNameRelativeTo: self)
oops, file fileNameRelativeTo: self answers:
'home/ned/Squeak/docPaneCache/PicAssembler.0.sp' even though file is an
absolute path.
This is then being concatenated to the current directory to provide a really
long and wrong path.
So there's several problems here with the handling of file:// URL's,
ServerDirectory, and ServerFile.
Does anyone who's using Unix (I have Linux) have this working? Or do I need
to try to figure out what's wrong?
--
Ned Konz
currently: Stanwood, WA
email: ned at bike-nomad.com
homepage: http://bike-nomad.com
More information about the Squeak-dev
mailing list
|