This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: DefaultPackageNamespace (DPN)
Feed Title: Travis Griggs - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/travis-rss.xml
Feed Description: This TAG Line is Extra
This is a really cool thing done by Alan Knight. It allows one to associate a default namespace with a package. Methods which are then compiled for that package are compiled within the namespace compilation scope. This is really handy for writing tools. Take ExtraActivity for example. It has a namespace which is used to hold its implementation specific classes. But then we have to "bridge" that implementation into the normal Smalltalk environment. We do this by adding a couple of "extension" methods to the already existant class VisualPart. Without DPN, I'd have to spec that references completely in those methods
With DPN though, I didn't have to (just be grateful we didn't have to use one of those _.references). I was able to create a "unit of work" with the packge, and while coding "in" it just solve the problem at hand.
However, I have a beef with DPN. It doesn't exist for 7.1. So while I do my development in 7.2, my colleagues (and are automated test engine) do not. So ExtraActivity can't be used there (kind of a chicken and egg problem, catch22, etc).