|
|
Choosing A Webhost: |
RE: Question about style: msg#00255lang.smalltalk.squeak.beginners
> I created the following method to create a convenient way of > accessing entries in the dictionary: > > doesNotUnderstand: aSelector > "for unknown selectors, see if we can find an > environment variable and return that" > ^ self at: aSelector asString ifAbsent: [ super > doesNotUnderstand: aSelector ] > > So my question is whether this is considered good style or > not? It works quite well (except the doIt in a workspace > pops up to say the selector is unknown). > > This sort of thing is done in Ruby often, and I did find some > examples in various classes in my image. > > (Actually one example even defined the missing accessor on > the fly - that's really showing off). > > Thanks, > Steve I have the same hack in my image, I'm sure many people do. I use it heavily because the SoapCore package returns dictionaries from web services calls in place of object if you haven't registered a specific object for use. I find it quite handy.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Question about style, Stephen Davies |
|---|---|
| Next by Date: | Re: Metaclass hierarchy - Explanation - Part 1, Michael Haupt |
| Previous by Thread: | Question about style, Stephen Davies |
| Next by Thread: | Special invitation: Squeak Meeting 28th Okt Bern/Switzerland, Marcus Denker |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |