Search code examples
smalltalkpharomonticello

How to create a MC package in Pharo


How do I add an MC package on Pharo (version 3.0)?


Solution

  • Max's answer is correct, but you typically would not create an MC Package directly. Usually, you would create a package in the code browser. For example you could:

    • Accept a class definition specifying an unknown category
    • "Add Package…" from the package pane context menu
    • Implement an extension method in an extension protocol specifying an unknown package

    In all these cases, a Pharo system package (specifically anRPackage) will be created, as well as an MC package of the same name.

    If for some special reason you need to create just an MC package, following Max's instructions will accomplish that.

    n.b. while Max's assertion that packages include sub-categories like MyPackage-Core is true in general, it is not true if there is a package that is a better match. So if there was a Pharo package MyPackage-Core, then it would hold all code categorized MyPackage-Core[-.], while MyPackage would hold all other MyPackage[-.]