<div dir="ltr">Hi Folks,<div><br></div><div>For some experiments I'm doing, I've created a subclass of <font face="monospace">CodePackage</font> (let's call it <font face="monospace">FakeCodePackage</font>) to make my tests run fast that avoids accessing <font face="monospace">Smalltalk</font> or <font face="monospace">SystemOrganization</font>.</div><div>When I filed-out the package and installed it in a fresh image, to my surprise, the newly installed package was an instance of <font face="monospace">FakeCodePackage</font>.</div><div><br></div><div>After poking around, I found this method in <font face="monospace">CodePackage</font> that is used when saving an instance:</div><br><font face="monospace">codePackageClass<br>  "Answer the specific CodePackage subclass to use."<br><br>  self class == CodePackage ifFalse: [<br>    ^ self class ].<br>  self classesDo: [ :cls |<br>    (cls inheritsFrom: CodePackage)<br>      fTrue: [ ^ cls ]].<br>  ^ nil</font><div><br></div><div>This means that whenever there is a subclass of <font face="monospace">CodePackage</font> in the package being saved, It is assumed that is the class that should be used to re-creating the <font face="monospace">CodePackage</font> instance when installing it.<br></div><div><br></div><div>In my case, <font face="monospace">FakeCodePackage </font>is not fully functional as I use it only in my tests, so I was unable to either delete the package or re-install it because of all sorts of errors.<br>Luckily this was a fresh image, so I had nothing to lose :)</div><div><br></div><div>I was wondering what is the use case for that, and if it still relevant/in use.</div><div><br></div><div>Cheers!</div><div>Nico PM</div><div></div></div>