The Artima Developer Community
Sponsored Link

Agile Buzz Forum
DefaultPackageNamespace (DPN)

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
DefaultPackageNamespace (DPN) Posted: Oct 2, 2003 9:11 AM
Reply to this message Reply

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
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Travis Griggs - Blog

Advertisement
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
VisualPart>>extensionMethod
	ExtraEmphas.SpecificClass someAPIOn: self
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).

Read: DefaultPackageNamespace (DPN)

Topic: When you have to take it with you... Previous Topic   Next Topic Topic: Spam vs. Anti-Spam - it gets ugly

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use