Mantis - Squeak
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
7562 | Documentation | minor | always | 09-08-10 11:00 | 09-12-10 21:34 |
|
|||||
Reporter: | hirzel | Platform: | |||
Assigned To: | casey | OS: | |||
Priority: | normal | OS Version: | |||
Status: | assigned | Product Version: | |||
Product Build: | Resolution: | open | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | |||
|
|||||
Summary: | 0007562: PackageInfo class comment | ||||
Description: |
The current comment is "Subclass this class to create new Packages" There should be an indication how to do this and a note about the options of using or not using it. There is no instance variable to keep a description of the package. |
||||
Steps To Reproduce: | |||||
Additional Information: |
PackageInfo instances are displayed by. PackageList open ---------------------------- Squeaklist Wed, Sep 1, 2010 at 1:57 PM On 01.09.2010, at 10:23, Frank Shearar wrote: > Andreas' latest commit had me looking at my SIP stack for the first time in a while. > > I had named it Network-SIP, because SIP's a network protocol, and I thought of the naming convention as indicating a nested approach. > > It seems that I'm mistaken here though - really, categories are a flat space, so classes in Network-SIP show up as part of the Network package. Well, only if a Network package exists. And if it does not define a custom PackageInfo. If it did, it could exclude "Network-SIP". > If I now understand correctly then, the mapping between class categories and packages uses the first token of the category name (so the characters before the first '-'). Is that right? It's just a convention. Most packages in trunk follow that convention. But e.g. ToolBuilder and HelpBrowser do not. When using the default package info then it depends solely on the name of the package. It matches a category named exactly like the package, plus all categories beginning with the package name and a hyphen. But the package name itself can well contain a hyphen, too. See class PackageInfo, it's pretty straight-forward. A package can include or exclude arbitrary classes and methods though, by subclassing PackageInfo. We don't use that in trunk, but third-party packages can, and occasionally do. Seaside used to do that. A particularly ingenious example is HMM's PackageInfo for OMeta2. > If so then I think I should rename my categories from Network-SIP-Foo to, say, SipStack-Foo, yes? (Like WebClient isn't Network-WWW.) Despite what I explained above, yes ;) If you care about sort order, NetworkSIP-Foo would work, too. - Bert - =================================== Squeaklist Fri, Sep 3, 2010 at 10:08 PM Bernhard Pieber <bernhard@pieber.com> Fri, Sep 3, 2010 at 10:08 PM Am 03.09.2010 um 19:59 schrieb Ralph Johnson: > On 9/3/10, Bert Freudenberg <bert@freudenbergs.de> wrote: >> A package is a (sub-) instance of PackageInfo. Packages are held by PackageOrganizer. >> >> One idea would be to include a PackageInfo subclass in each package, and its class comment or methods would describe the package. That would hook into HelpSystem so one could browse comments, instructions, examples etc. per package. >> >> There are a few conventions for that already, e.g. the class name should end in "Info" and it should be in a category named "PackageName-Info". > We could certainly include a PackageInfo subclass in a package. But > Monticello wouldn't use it to make the instance of the package, would > it? The strange thing is that PackageInfo supported subclasses from day one. According to Avi they were even required at first. However, I looked but could not find a place in the code where they are instantiated. It seems that one has to manually register them by code in order to use them. It seems that no PackageInfo subclasses can be created by just using the tools. :-/ - Bernhard ===================================== Andreas Raab does not like the idea of subclassing, Reason? Squeaklist Sat, Sep 4, 2010 at 2:40 AM If you explore "PackageOrganizer default packages" in 4.1 you will find that there is (for example) AnObsoleteFlexibleVocabulariesInfo. Which illustrates my dislike of PI subclassing very well :-) |
||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|