[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] [commit] Color-==



We still need this one in order to let Color-== work properly...
I think it is not in the distro for now...

could someone please... ?

regards
Till


On 07 Jan 2006, at 20:14, Till Bovermann wrote:

Hey again,

so this should do the trick?

+ Color {
	== {|that|
		^(that.respondsTo(#[\red, \green, \blue, \alpha])
			and: {(this.red  == that.red)
			and: {this.green == that.green}
			and: {this.blue  == that.blue}
			and: {this.alpha  == that.alpha}
		})
	}

hash { ^red.hash bitXor: green.hash bitXor: blue.hash bitXor: alpha.hash }
}


regards
Till


On 07 Jan 2006, at 07:17, James McCartney wrote:


This should not be committed unless you also override hash.
It is required that whenever you override ==, you must override hash such that things that compare equal have an equal hash.

On Jan 4, 2006, at 12:52 PM, Till Bovermann wrote:

Hey all,

could someone please checkin

+ Color {
	== {|that|
		^(that.respondsTo(#[\red, \green, \blue])
			and: {(this.red  == that.red)
			and: {this.green == that.green}
			and: {this.blue  == that.blue}
		})
	}
}

to Color?

thanx in advance
Till


_
may I ask for an sc dev account?
_______________________________________________
sc-dev mailing list
sc-dev@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-dev

_______________________________________________
sc-dev mailing list
sc-dev@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-dev

_______________________________________________
sc-dev mailing list
sc-dev@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-dev