Monticello, SM2, BFAV in 3.7alpha

Julian Fitzell julian at beta4.com
Mon Feb 2 16:49:08 UTC 2004


Chris Burkert wrote:
> Avi Bryant wrote:
> 
>>
>> On Feb 2, 2004, at 2:18 AM, Chris Burkert wrote:
>>
>>>
>>> Let's say I have package 'A' and package 'B'. And I have a class that 
>>> belongs to A *and* B. Where should I put it?
>>>
>>> My solution was to create a third package and add this as a 
>>> prerequiste of A *and* B. Not a good solution if there is a more 
>>> complex example.
>>
>>
>>
>> Why not?  Can you give me a more complex example where this wouldn't 
>> be a good solution?
> 
> 
> The 'bad' thing is, that there will be a throng of little prerequistes 
> in a more complex example. OK, you could say I have to refactor the 
> whole thing. But in my example I just wanted to extract a piece of code 
> without changing the original package.

Well, I think you're write that refactoring is the correct solution in 
the long run, but...

> Nevertheless it would be fine to 'extract' a part of a package without 
> refactoring or changing the categories of the old package just by 
> saying: my new package should consist of category 'a', 'b' and the Class 
> 'MyClass' and the method 'AnotherClass>>myMysthicMethod' (just like the 
> dual changesorter can do).

Presumably you should be able to do this with a custom subclass of 
PackageInfo if you really want to.  The default is to use system and 
method categories but you can define any rules you want.  It may not be 
the nicest interface, but then not refactoring code to make it shareable 
isn't very nice either ;)

That might get you through the short term...

Julian





More information about the Squeak-dev mailing list