[Newbies] Porting an old app to a recent image

Yoshiki Ohshima yoshiki at vpri.org
Fri Oct 10 20:24:09 UTC 2008


> ScratchFrameMorph class-readPaintSkinFrom.st

  Cool, it is a fun class to work on.  I tried to file it in to 3.10.2
and did get the Syntax Error panel properly.

The trouble seems to me that in the following part and after, variable
"n" is used but it is a block local variables in the previous blocks.

------------------------------
			n _ root, part.
------------------------------
which is in:
------------------
	"resizeable button/typein forms"
	#(paintUtilityButton) do: [:root |
		#(Left Middle Right) do: [:part |
			n _ root, part.
			pressed _ root, part, 'Pressed'.
			ScratchSkin at: n asSymbol put: (Utilities form: n from: aDirectory).
			root ~= #typein ifTrue: [
				ScratchSkin at: pressed asSymbol put: (Utilities form: pressed from: aDirectory)]]].
------------------

If you look at the Syntax Error window, there is "out of scope ->"
indication in front of "n".  In the older image like the MIT Squeak,
it was forgiven but not anymore in the newer images.

So, rename the variable n in that part to something else and it should
be fine.

-- Yoshiki


More information about the Beginners mailing list