[squeak-dev] Transcript warning in MVC

Chris Muller asqueaker at gmail.com
Mon Sep 15 21:33:55 UTC 2014


UI code can be notoriously difficult to debug, eh?  One primitive tool
I sometimes use is a good ol'e Smalltalk global, say #X.  I make it an
OrderedCollection and then, in #setUpdatablePanesFrom:, just before it
prints to the Transcript, add in this line:

  X add: thisContext longStack.

Or,

  X add: { thisContext longStack. subViews copy }

can sometimes give some clues.


On Sat, Sep 13, 2014 at 11:35 PM, Casey Ransberger
<casey.obrien.r at gmail.com> wrote:
> I've been using MVC. It's still buggy, but mostly usable. I thought that if
> someone just used it for a little while, we'd know where most of the worst
> bugs are.
>
> Currently tracking two issues, one with errors occurring after bringing up
> context menus (haven't started really digging on that one yet,) and a
> warning which appears for reasons unknown in the Transcript. This is about
> the latter.
>
> Warning: view contents not found.
>
> I spent probably ten minutes sifting through all of the methods containing
> the string 'Warning:' when the whole string didn't turn up any hits, and I
> do think I have a lead.
>
> It looks like the latter issue is occurring in
> StandardSystemView>>setUpdatablePanesFrom:, but I'm not sure why yet. The
> method itself seems pretty straightforward, but for some reason, the block
> temp aPane is ending up nil.
>
> If I'm reading this right, aPane is assigned the value of sending
> #subViewSatisfying: to a StandardSystemView (in this case, self,) and the
> argument seems to be a block specifying a constraint, and I may as well
> paste in the send.
>
> aPane := self subViewSatisfying:
> [:pane | (pane isKindOf: PluggableListView) and: [pane getListSelector ==
> sel]].
>
> This happens right before the nil check, which probably means that the
> constraint doesn't match whatever #subViewSatisfying: searches (or
> #subViewSatisfying: is just borked.)
>
> View>>#subViewSatisfying: is trivial, and indeed returns nil on no-match.
> The variable subViews just doesn't have what the method is looking for. I
> set a breakpoint in order to learn what was actually in there, but alas: it
> doesn't repro when I'm looking, which is more or less an "all stop" for me
> on this one.
>
> Does anyone know this code well?
>
> TIA,
>
> Casey
>
>
>
>


More information about the Squeak-dev mailing list