|
Re: reimplementing #= and #hash: msg#00122lang.smalltalk.squeak.beginners
Hi Ching, #= is test for equality while #== is test for identity. What do you probably want is to override #= to compare two PoolQueues if they are equal or not. But what "equal" means in your case is on you to define. Maybe something like this: PoolQueue>>= anotherPoolQueue ^(self member = anotherPoolQueue member) and: [self processor = anotherPoolQueue member] But be sure that also member and processor instvars understand #= in a correct way. All numbers, strings, symbols etc. understand equality as expected. I hope this helps a bit. Janko Ching de la Serna wrote: Hi List, -- Janko Mivšek AIDA/Web Smalltalk Web Application Server http://www.aidaweb.si
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: reimplementing #= and #hash, Oscar Nierstrasz |
|---|---|
| Next by Date: | Re: reimplementing #= and #hash, Ching de la Serna |
| Previous by Thread: | Re: reimplementing #= and #hash, Ching de la Serna |
| Next by Thread: | Re: reimplementing #= and #hash, Ching de la Serna |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |