new PackageInfo versions
avi at beta4.com
Wed Feb 18 09:03:10 UTC 2004
I've had some new versions of PackageInfo and related packages
(PackageInfo-Exporters, PackageInfo-Extras) gathering dust in a
repository since the initial TFNR work, and it occured to me that it
would be good to get them out there before 3.7. So they're now on SM
for those that want them.
One major difference is that PackageInfo instances now stick around,
and so in theory could have additional state associated with them.
This does mean that subclasses of PackageInfo should explicitly
register themselves when loaded to ensure that the right PackageInfo
instance gets created. The easiest way to do this is by adding a class
side initialize method to your PackageInfo subclass that simply calls
"self new register". Any custom subclasses already in your image will
be automatically registered when you load the new PackageInfo version,
but if you load others afterwards (like Seaside) you will have to
manually register these until the package maintainers update them:
"Seaside2Info new register" . Hopefully there are few enough packages
around with PI subclasses that this isn't a huge deal.
Another difference is that there's now a registry for PI-related menu
items, similar to the registry for the FileList. There are examples of
using this in both PackageInfo-Exporters and PackageInfo-Extras. In
the long run I envision all tools that do anything with packages
(Monticello, a future Package Browser, etc) will add these to the
bottom of their context menus. PackageInfo-Base includes a simple
PackageList UI which allows you to add/remove packages and test the
There are some other changes, like a PackageOrganizer class which
provides some convenience methods for looking up the package for a
particular class or method, intended to provide a base for future tool
integration. These are probably mostly of interest to TFNR folk.
More information about the Squeak-dev