The Artima Developer Community
Sponsored Link

Agile Buzz Forum
The perils of overrides

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
The perils of overrides Posted: Aug 1, 2006 3:21 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: The perils of overrides
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

I was trying to figure out a networking issue (turns out that it's related to the access rights in the training room) when I stumbled across a nasty little bug in BottomFeeder. In Bf, I use a HTTP package called NetResources, which adds application level niceties on top of the stock HTTP libs in VisualWorks - cookie management, caching, and a number of other things. As part of that, we add extensions to the HttpClient class, and also override the class definition. That's where things got hairy.

If you override class definitions, you really need to check them with each new release of the base product. I didn't do that, and I ran into this - here's the stock definition of the class:


Smalltalk.Net defineClass: #HttpClient
	superclass: #{Net.NetClient}
	indexedType: #none
	private: false
	instanceVariableNames: 'request proxyHost keepAlive useProxy connection
 entityParsingOptions cookieAgent enableCookies protocol authPolicy '
	classInstanceVariableNames: ''
	imports: ''
	category: 'Net-HTTP-Support'

And here's what I had in 7.3:


Smalltalk.Net defineClass: #HttpClient
	superclass: #{Net.NetClient}
	indexedType: #none
	private: false
	instanceVariableNames: 'request proxyHost keepAlive useProxyAuthorization connection
 entityParsingOptions cookieAgent enableCookies protocol originalResponse '
	classInstanceVariableNames: ''
	imports: ''
	category: 'Net-HTTP-Support'

The variable "originalResponse" was added so that after certain exceptions, we could go back and examine the state. The big problem is that other than that, the definitions should match (and they didn't). I patched that this morning, but I think I'll do a fresh build when I get back from this trip. Grab the patch for Http-Overrides in the meantime!

Technorati Tags: ,

Read: The perils of overrides

Topic: Making your blog popular Previous Topic   Next Topic Topic: When the clueless legislate...

Sponsored Links



Google
  Web Artima.com   

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