changes to existing class definitions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

changes to existing class definitions

Johannes Rasche
if I wanna add some methods to existing classes
I create categories like "*packageName"

but how to handle changes to class definitions?

what is the recommended way to do that?

I'm not sure it's good to change the category name

Johannes



Reply | Threaded
Open this post in threaded view
|

Re: changes to existing class definitions

Sven Van Caekenberghe

On 14 Nov 2011, at 14:43, Johannes Rasche wrote:

> if I wanna add some methods to existing classes
> I create categories like "*packageName"
>
> but how to handle changes to class definitions?
>
> what is the recommended way to do that?
>
> I'm not sure it's good to change the category name
>
> Johannes

I don't think that is possible with Monticello.

It also doesn't strike me as a very good idea regarding system stability.

Can't you make a subclass ?

Sven


Reply | Threaded
Open this post in threaded view
|

Re: changes to existing class definitions

Johannes Rasche
I need to add some additional methods to PasteUpMorph

for that purpose I created a Trait

my question is how to add "uses: XXTrait"

up to Pharo 1.0 I used a subclass of PasteUpMorph,

but replacing the existing world now seems more complicated to me,
some related functionality of Squeak was removed for some reason

Johannes

Am 14.11.11 15:06, schrieb Sven Van Caekenberghe:

> On 14 Nov 2011, at 14:43, Johannes Rasche wrote:
>
>> if I wanna add some methods to existing classes
>> I create categories like "*packageName"
>>
>> but how to handle changes to class definitions?
>>
>> what is the recommended way to do that?
>>
>> I'm not sure it's good to change the category name
>>
>> Johannes
> I don't think that is possible with Monticello.
>
> It also doesn't strike me as a very good idea regarding system stability.
>
> Can't you make a subclass ?
>
> Sven
>
>


Reply | Threaded
Open this post in threaded view
|

Re: changes to existing class definitions

Herby Vojčík
Johannes Rasche wrote
my question is how to add "uses: XXTrait"

up to Pharo 1.0 I used a subclass of PasteUpMorph,

but replacing the existing world now seems more complicated to me,
some related functionality of Squeak was removed for some reason
the
Johannes
Well, just a wild idea, not that I know exactly what are possibilities of the beast, but can't environments be used so that in certain environment the subclass PasteUpMorphWithXX of base class PasteUpMorph would be known under name #PasteUpMorph? This way you can use the subclass, you just need to initialize environment properly...