[ENH] FileListFileOpenFix-nk v2 ( Can not install this fix )

Frank Shearar frank.shearar at rnid.org.uk
Wed Jun 2 16:30:08 UTC 2004


> >>> "Doug Way" 06/01/04 18:56 >>>
>
> Frank Shearar wrote:
>
<snip>
> >OK, as a stab in the dark, I added String>>fullName, which
> returns self. (I
> >just realised that i could have left the method empty, but I
> like being
> >explicit.) That seems to work. Certainly the BFAV attachment
> installed fine
> >afterwards.
> >
> >At any rate, I'd appreciate other minds than mine, preferably more
> >knowledgeable ones, thinking about this - does
> String>>fullName make sense?
>
> I think we probably do not want to create String>>fullName...
>  #fullName
> is normally implemented by file-related classes such as FileDirectory
> and StandardFileStream, so it sounds like the problem is that
> a String
> is being sent this message when the sender is really expecting a
> FileDirectory or similar for that object.  So, we need to trace where
> that String is coming from.

Yes, that was my thought as well, but I thought I'd throw out my bad idea in
a public place & see what my betters thought :)

Ah, I found it! PatchArchiveClient>>performAttachmentService:on: used to say
this: (1)

	aServiceEntry perform: aServiceEntry requestSelector
		withArguments: { aServiceEntry getArgumentsFrom:
							(PatchArchiveAttachment fullName: anAttachment) }.

It should instead say this: (2)

	aServiceEntry performServiceFor: (PatchArchiveAttachment fullName:
anAttachment).

Otherwise #perform:withArguments: gets called with the String made from
#getArgumentsFrom: instead of something that supports #fullName.

Thing is, this reverses the change in Ned's BFAV changeset, and Ned's far
more clueful than me, so maybe I've grabbed the strong end of the wick. Oh,
no, silly me. What happens is this: BFAV's got a
PatchArchiveClient>>performAttachmentService:on: containing the
implementation of (1). ServicesInArchiveViewer-nk and FileListOpenFix-nk get
installed. But when you try to install BFAVFileListOpenFix-nk you can't
because the other two changesets have broken
PatchArchiveClient>>performAttachmentService:on:.

Ned's version of PatchArchiveClient>>performAttachmentService:on: reads: (3)

	aServiceEntry performServiceFor: (PatchArchiveAttachment fullName:
anAttachment).

which reads just like mine (2) + an Extract Method refactoring.

If you install BFAVFileListOpenFix-nk first, you get Tom's problem - a
walkback moaning about something not being indexable.

To get all three changesets you must save BFAVFileListOpenFix-nk to disk,
then load ServicesInArchiveViewer-nk and FileListOpenFix-nk, and then
install BFAVFileListOpenFix-nk from a FileList.

frank





More information about the Squeak-dev mailing list