[Newbies] Re: DNU when trying to update squeak-web-118

Stephen Davies stephen.l.davies at gmail.com
Thu May 17 20:00:43 UTC 2007

On 17/05/07, Stephen Davies <stephen.l.davies at gmail.com> wrote:
> I feel helpless to fix this; I believe it has to do with the Universe
> Browser trying to refresh whilst the update is loading.  "parent" is
> nil (?)
> I'm hoping for two things - first is a fix so I can keep my image up
> to date.  But the other: more important even - somebody to show me how
> to get from this error to an understanding of what has gone wrong...

OK - I've had a little go with some success.

Who wants to critique my process:

- an argument "aNode" was nil when obviously it shouldn't have been.

- so I searched my way down the walkback, and eventually found that
getChildren in OBColumn had been called - it did "children := self
filter nodesForParent: self parent.".
But "self parent" returned nil.  Looking at the helpful class comment
(YAY!!) I concluded that the column was the leftmost in a browser,
hence had no parent.  Couldn't immediately follow what the code was
doing, but then ...

- I noticed that the name of the OBColumn was the name of a class
category in my system - so my problem wasn't with the Universe Browser
but with a class browser.

- So I restarted my image, closed the browser (and monticello for
luck) and tried again.

Unfortunately, I got another walkback for the same reason, only this
time the problem column was in the Universe Browser.  That has to be
open, so what now?

Scratching around in the "problem" OBColumn using inspector, browser
etc and I get a tentative theory by leap of guesswork - The OBColumn
thinks its name is "Selected packages (0)".  But the Universe Browser
still has "Selected packages (6)".  Maybe the mismatch is why there is
no parent?

So I restart my image again, then in the Universe Browser I switch the
radio buttons at the bottom away from "Statuses" to "Packages" and try
the install again

Fails again.

So I restart my image again, switch to Packages and highlight a
package and version and try the install again.

Still get the walkback.  Give up my theory about the name of the item.

This time the OBColumn is an OBColumn(AST).  That's the package
highlighted in the left-most column of the Universe Browser.

I note that the OBColumn "children" inst variable does contain an
OrderedCollection.  Using the inspector I see that it is the list of
packages shown in the leftmost pane of the Universe Browser.

Looks like getChildren is trying to refresh that list by asking the
filter to refetch the list fo r the same parent as the selected entry.

Seeing our entry doesn't have a parent, I decide to change getChildren
to just return the children as they are in that case.

Aargh - in trying to edit it I get a "primitive failed" - 	<primitive:
'primitiveCopyBits' module: 'BitBltPlugin'>  Something to do with
FreeType2 and Shout syntax colouring I think.  All my code become a
crossed out red box.

So I go to the Preference Browser and turn off "syntax highlighting as
you type".  We'll figure that out another day.

Insert "(self parent) ifNil [^children]." at the top.

Save, save the image and try again.

I get a warning "You are about to load new versions of the following
packages that have unsaved changes in the image.  If you continue, you
will lose these changes." for OmniBrowser.


Bugger - my change is overwritten and up comes the DNU again.

This time I edit the method right in the debug window.  Alt-S and then
"Restart" and "Proceed".

Yay - looks like I got there in the end.

Into the change sorter and move the OBColumn change into a more
meaningfully named changeset.

So how did I do negotiating the obstacle course ;-) ?


More information about the Beginners mailing list