Mantis - Squeak
Viewing Issue Advanced Details
6730 Etoys minor always 10-14-07 02:46 10-16-07 20:29
0006730: GeeMailMorph initialzation causes nil to be used as a dicitonary key
nk 11/1/2004 07:48 UndefinedObject initialize {*eToys-*Morphic-customevents-class initialization}'

    "AlansTextPlusMorph initialize"
    ScriptingSystem addCustomEventFor: self named: #scrolledIntoView help: 'when I am scrolled into view in a GeeMailMorph' targetMorphClass: Morph.
    ScriptingSystem addCustomEventFor: self named: #scrolledOutOfView help: 'when I am scrolled out of view in a GeeMailMorph' targetMorphClass: Morph.
Apparently when AlansTextPlusMorph was changed or removed the initialization responsibility was given to the instance side of UndefinedObject.

It clearly doesn't belong there.

I found this when writing tests that check the integrity of Identity dictionary instances.

iDictionary keys breaks when nil is used as a key. An identity set can not have nil as a valid member.

This is also broken in squeakland and olpc images.

So where does this initialization belong?
Or can it be removed entirely?

Yours in curiosity and service, --Jerome Peace
related to 0006721feedback  In 7149 Identity dictionarys sometimes can't find their keys 
 nilKeyFix2-wiz-M6730.3.cs [^] (2,886 bytes) 10-16-07 03:04

10-14-07 04:26   
Reminder sent to: ScottWallace

Hi Scott,

I could use your help on this.

Cheers -Jer
10-15-07 10:52   
Hi, Jerome.

This was almost certainly simply an editing error made in update 6458-0367specificEvents-nk back in November 2004. The method (UndefinedObject >> initialize) is obviously there in error should simply removed.

In Squeakland and olpc/etoys images, at any rate, the necessary initialization for the custom #scrolledIntoView and #scrolledOutOfView events is lodged in GeeMailMorph's class-side initialization. In any images that do not have GeeMailMorph, the point is presumably moot.

So, again, UndefinedObject >> should undoubtedly be removed.

  -- Scott
10-15-07 18:11   
Hi Scott,

Thanks for your help.

I'll look at the oplc gmail init and take my cues from there.

Yours in curiosity and service, -Jer
10-15-07 21:19   
Jerome: Again, it's really okay, and desirable, simply to remove the method UndefinedObject >> initialize, which obviously should not be there. IMO no need to spend more time trying to delve more deeply into this issue -- the method clearly got compiled into UndefinedObject either because of operator error or because of tools failure, but in any case it simply does not belong there, and should simply be removed.
  -- Scott
10-16-07 03:30   
Hi Scott,

I've got my fix.

I was interested in preserving the GeeMailMorph as a working entity in 3dot10 so I did not want to just remove the code.

I have uploaded a fix with the code moved to class side of Gmail and the unload method added there as well. I don't know if this is all that is needed but here I am just concerned with fixing the nil key problem without taking responsibility for making anything else worse.

I would like at some point to see oplc/etoys/squeakland reconciled with squeakdevs stream of stuff. I don't know if there is a community will or resources to do that but I don't wish to push code that gets us further from the possibility.

Thanks again for your support.

10-16-07 20:29   

I went back and checked the general health of GeeMail in 3dot9 and 3dot10.

GeeMail is not readily findable in 3dot9 (It is not on the widgets flap or in any of the object catagories.)

In 3dot10 it is now back in the widget flap but works wierdly.

Grabbing a GeeMail out of the flap and then dropping a polygon or curvier on it gets a error box. But the object gets imbedded. Then lifting the object out of the morph act wierd. The hand will pick it up but it is displaced way to the top left of the screen.

So it doesn't seem GeeMail is working in 3dot9 or 3dot10 and its existence is better hidden in 3dot9.