[squeak-dev] TonelFileSystemutils initialize not being run automatically?

Marcel Taeumel marcel.taeumel at hpi.de
Sun Oct 11 10:51:04 UTC 2020


Hi all --

> That tells me that the "initialize" method of TonelFileSystemUtils is not being run upon installation.

A class-side #initialize is run only if (a) added to the system or (b) changed. I suppose that that "Current" will be overwritten somewhere during the initial set up? I mean, *after* it was evaluated once.

Best,
Marcel
Am 11.10.2020 09:40:45 schrieb gettimothy via Squeak-dev <squeak-dev at lists.squeakfoundation.org>:
Hi folks,


Yesterday, I wrote:


A couple of things.


TonelFileUtils install

is not being automatically run . this populates the Current class instance variable needed or the TonelFilueUtils > current class side call.


Then, in 


TonelRepository >> directoryFromFileName: aString

"Answer the reference to the directory represented by the 'file name'."

^ self fileUtils

directoryFromPath: (self class directoryNameFromFileName: aString)

relativeTo: self directory


is throwing an SubclassResponsibility signal because 


TonelFileUtils class >> directoryFromPath: directoryPath relativeTo: aDirectory    self subclassResponsibility

What I presume we want is a TonelFileSystemUtils...


so....in 



TonelFileUtils class >> install    Current := self

make it:



TonelFileUtils class >>install    Current := TonelFileSystemUtils




Well, this morning I took a look at TonelFileSystemUtils and it has a class side initialize method.


Run that and the 'self' referred to by Current is correct.


That tells me that the "initialize" method of TonelFileSystemUtils is not being run upon installation.





cheers,


t
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20201011/25ca94ad/attachment.html>


More information about the Squeak-dev mailing list