[UPDATES] 30 new updates for 2.8alpha

Dan Ingalls Dan.Ingalls at disney.com
Mon Feb 7 15:20:10 UTC 2000


Steve -

>I understand Undeclared as a way to make handling forward references
>easy while filing in code.  Usually code further on resolves the
>problem.  It's also useful for unofficial globals, better than Smalltalk
>(the SystemDictionary) since it only has a few entries.  What do others
>do with it?

It is intended solely for the resolution of forward references.  It should always be empty in a stable image.  We check that it is clear as a part of making a release.  With test pilot updates I check but, as in the case of SearchMorph, I let things go if they look harmless (the only ref to SearchMorph is a method with no senders).

>Anyway, here's what I did (and always do) after filing in and noticing
>Undeclared in the Transcript.
>
>1. Open an Inspector on Undeclared.
>
>2. Browse references to each key I find.
>
>3. If none, remove the entry from Undeclared.  This is what I did for
>the '(node is Undeclared)' warnings I saw while #1818 was coming in.

Check out the do... menu.  There is an item that does all the above for you...

	Undeclared removeUnreferencedKeys; inspect

>4. If references exist, I leave it in Undeclared and investigate
>further.  This time 'SearchMorph' is referenced by
>#helpPaneForFactoredPanel in Preferences class and 'change sets with
>this method' says it came in with #1792, the preferences rework. 
>'senders' reports none, but you can't always trust 'senders' of methods
>on the class side of Preferences.  See #callHelpMessageInitializers.
>
>If I think of it, I check Undeclared *before* loading code, but I forget
>at least half the time.  Forgot this time.
>
>So I'll keep an eye out for problems with SearchMorph, a class I hope to
>see soon, ;-) but I may not have any.  

We're watchful, too.
Generally we won't let an Undeclared through if it's in active code, even for test pilots.  I called Scott when I saw this, and he said more is coming, and that ref will be resolved.

>Watchfully,
>Steve
>
>P.S.  The sneaky way that Undeclared can trick you is by acting as a
>global slot for what you understand to be an instance variable.  I'm not
>as tolerant of these kinds of entries in the dictionary.  What do I do
>then?  Different things, depending mainly on the subtlety of the problem
>and how bad I want the code.  Often adding an instance variable to a
>class fixes it.

You may complain for sure if you see this kind of Undeclared variable after downloading official Squeak updates.

	- D






More information about the Squeak-dev mailing list