A question on override on MC
Bert Freudenberg
bert at impara.de
Thu Jan 20 23:51:59 UTC 2005
Am 17.01.2005 um 09:54 schrieb stéphane ducasse:
> Hi all
>
> I have the following need:
>
> I have
>
> Package A
> AA>m
> ^1
>
> in Package B
> AA>m
> ^2
>
> So when I load A and B
> AA new m -> 2
>
> Now if I unload B
> AA new m -> 1
> (I still do not know how I should named the category since I forget
> all the times *overrides?)
PackageInfo>>isOverrideCategory: aString
^ aString endsWith: '-override'
> Now if I have A and B loaded when I published
>
> Package A
> AA>m
> ^1
>
> in Package B
> AA>m
> ^3
>
> A and B and A got changed elsewhere
>
> Now when I load only A
> Do I get
> AA new m -> 1
>
> So my question: are overriden methods saved in package even if there
> are masked at save time?
Yes they should. You need to have the latest PackageInfo-Base package
loaded.
See PackageInfo>>changeRecordForOverriddenMethod: for the scary magic
that parses backwards in the changes file for the latest version.
HOWEVER better try hard not to use this. It's much cleaner to publish a
refactored version of the package you're overriding instead.
- Bert -
More information about the Squeak-dev
mailing list
|