[BUG?][QUESTION] Browser behavior change between Squeak 2.x and 3 .x ???

Swan, Dean Dean_Swan at Mitel.COM
Mon Nov 25 22:54:01 UTC 2002


Ok, so I have to admit that I still do most of my Squeaking with 2.7, but I just wanted to try a few quick things in 3.2 and I discovered something *VERY* disturbing.

I was reading the thread on the Croquet Matrix class and Richard O'Keefe's alternative implementation, and I wanted to try an experiment regarding the compiler syntax "hack" in Croquet.  Here's what I did:

	 1) Start with a clean 3.2-4956 image
	 2) Open a new Morphic project and enter the new project
	 3) Open a browser, select 'Collections-Arrayed'
	 4) Select 'Array2D' in class pane.
	 5) In code pane, change '#Array2D' to '#Matrix2D', accept changes (Cmd-S)
	 6) Select 'Array2D' in class pane.
	 7) Select 'at:at:' in method pane.
	 8) Select all text in source pane, copy to clipboard (Cmd-C)
	 9) Select 'Matrix2D' in class pane.
	10) Select all text in source pane, paste (Cmd-V)
	11) accept changes (Cmd-S)

Then the compiler comes back with:

	 Nothing more expected ->at: x at: y
		"Answer the element at index x,y."

		^ contents at: (self indexX: x y: y)

in the source pane.

Completely confused, I try adding a method with no arguments.  Following steps 6 through 11 above, but changing step 7) to: Select 'AsArray' in method pane.  This time, I get a menu pop-up saying:

	Unknown variable: asArray
	 please correct, or cancel:
	declare temp
	--------------------------
	cancel

This is equally confusing.

In both cases, I *EXPECTED* the new method to be compiled and added to the 'as yet unclassified' method category.  I did not expect the strange behavior that I got implying that there was some kind of error with the new method.

If I created a new category for 'accessing' methods and tryied to accept the at:at: method definition with the 'accessing' category selected, everything worked fine.  Adding a method category for 'converting' and accepting the 'asArray' method also worked fine.

It seems that what is broken is trying to save a method while the '-- all --' category is selected.

Browser>>compileMessage:notifying: is identical in 2.7 and 3.2, and it definately has special case code to add a new method to the 'as yet unclassified' category if '-- all --' is selected when it is invoked.

I don't mind so much if there was a decision to do away with the 'as yet unclassified' category, but I should see a pop-up or some kind of notification that I must select a category for my new method rather than a compiler error that implies something is wrong with my code, which in this case was copied verbatim from "known-good-code".

I'm posting this to the list because I imagine that somebody out there will know where things went wrong and can more quickly point me in the right direction.  If not, I'll hunt this down and fix it, but I thought I'd give the list a try first.

Squeak 3.0 also exhibits the "new" behavior.  I don't have a copy of 2.8 or 2.9 handy to see just where this crept in, but it has been here since at least 3.0.

                                          Thanks.
							-Dean Swan



More information about the Squeak-dev mailing list