[ANN] OmniBrowser 1.0b2

Jon Hylands jon at huv.com
Sun Jan 9 14:11:12 UTC 2005


On Sat, 8 Jan 2005 15:49:18 -0500, Colin Putney <cputney at wiresong.ca>
wrote:

> I've just published OmniBrowser 1.0b2 to SqueakMap.

Hey Colin,

Interesting bug in Squeak showed up with this, although I suspect it has
been fixed in 3.8.

In OBColumnPanel >> #hopTo: it calls #before:ifAbsent:. This gets called
when you do a find class. In 3.7, #before:ifAbsent: looks like this:

before: target ifAbsent: exceptionBlock
	"Answer the receiver's element immediately before target. Answer
	the result of evaluating the exceptionBlock if target is not an
element
	of the receiver, or if there are no elements before it."

	| index |
	index _ self indexOf: target.
	^ index == 0
		ifTrue: [exceptionBlock value]
		ifFalse: [index == 1 
			ifTrue: [self errorFirstObject: target]
			ifFalse: [self at: index - 1]]

If index = 1, then you get an error rather than evaluating the exception
block, which is clearly not what the comment says it does.

Has this been fixed in 3.8, or am I the only one who ever uses 'find class'
with OB?

Later,
Jon

--------------------------------------------------------------
   Jon Hylands      Jon at huv.com      http://www.huv.com/jon

  Project: Micro Seeker (Micro Autonomous Underwater Vehicle)
           http://www.huv.com



More information about the Squeak-dev mailing list