Re: About RPackage
Posted by
Stéphane Ducasse on
Mar 02, 2011; 8:12am
URL: https://forum.world.st/About-RPackage-tp3330650p3331138.html
On Mar 1, 2011, at 11:06 PM, Tudor Girba wrote:
> This was the main problem in the original implementation because the logic of the organizer also depended on this. So, we took it out and I find this way better :).
Ok I do not remember the protocol.
we should ask the PackageOrganizer to create a package?
or just to register it.
I have the impression that making sure that a package is registered wen created makes sense since the client does not have to do it and forget to do it.
So in the PackageInfo logic there are two points;
- registration
- query/creation
I have no problem to discard - query/creation
So to which of these two aspects are you referring to.
Stef
>
> Of course, we can create a helper method for compatibility reasons, but no internal logic should depend on this.
>
> Cheers,
> Doru
>
>
> On 1 Mar 2011, at 22:59, Stéphane Ducasse wrote:
>
>> Another point
>>
>> RPackage>>named: aString
>>
>> | newPackage |
>> newPackage := self new name: aString ;yourself.
>> "self organizer registerPackage: newPackage."
>> ^ newPackage
>>
>> does not register the package and this looks suspicion to me.
>>
>>
>> In addition I do not remember the exact logic but the pattern with PackageInfo is that
>>
>> PackageInfo named: #foo creates the package if it does exist
>>
>> PackageInfo class>>named: aString
>> ^ PackageOrganizer default packageNamed: aString ifAbsent: [(self new packageName: aString) register]
>>
>> So do you remember because it may be better to have the same creation protocol.
>>
>> Stef
>>
>>
>>> Hi cyrille/doru and others.
>>>
>>> I do not understand why
>>> RPackage organizer packages contains System?
>>>
>>> In fact all the categories are mapped to packages and I wonder why.
>>> I imagine that this is to avoid to have mostSpecific* logic of packageInfo,
>>> but it means that in such a case we should merge categories to get back the package we have right now
>>> else we will end up with loading/saving problems.
>>>
>>>
>>> Stef
>>
>>
>
> --
> www.tudorgirba.com
>
> "Be rather willing to give than demanding to get."
>
>
>
>