<div dir="ltr">Thanks for the tip. I didn&#39;t know I could get the stack by sending a message to thisContext, but it makes perfect sense. That&#39;ll be useful all over the place.<div><br></div><div>As for debugging in UIs: when I started playing around with the idea of &quot;desktop themes&quot; in Cuis, I definitely saw the precarious relationship between the debugger and the graphics system that renders it. When you&#39;re changing the behavior of (say) SystemWindow, and you botch something, you get… a debugger, attempting to render itself, encountering the bug you&#39;ve introduced, popping a new debugger, rinse-repeat until the screen is completely full of broken debuggers and you force-quit the VM in defeat! Which in Cuis happened *crazy* fast, even on the interpreter.</div><div><br></div><div>Of course, the benefits of system-implemented-in-itself generally dwarf the drawbacks. One learns new ways of working and gets used to the sticky parts. I remember when I first got started, and I wanted to rename a class variable in the UI, I was like &quot;how in the hell do I do this without breaking stuff?&quot; It wasn&#39;t hard to realize that I could just create a new variable, stick the value in it, point everything that uses it at the new variable, and fire torpedoes into the old one, but growing up with mostly write-compile-coffee-lunch-debug had hobbled my thinking.</div><div><br></div><div>Anyway MVC beats the pants off of Squeak&#39;s Morphic implementation at the track, so I think it makes sense to use it for web heads, databases, stuff like that where generally no-one is actually using the UI most of the time. It seems like the most sensible tool to use in making Morphic re/unloadable, at least for now (though I&#39;ve thought a bit about eventually getting rid of both and using the telnet-thingy in OSProcess, or possibly remote messaging/debugging.)</div><div><br></div><div>That awkward moment when one realizes that the murky road less travelled by was once the only thoroughfare in the world.</div><div><br></div><div>Casey</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 15, 2014 at 2:33 PM, Chris Muller <span dir="ltr">&lt;<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">UI code can be notoriously difficult to debug, eh?  One primitive tool<br>
I sometimes use is a good ol&#39;e Smalltalk global, say #X.  I make it an<br>
OrderedCollection and then, in #setUpdatablePanesFrom:, just before it<br>
prints to the Transcript, add in this line:<br>
<br>
  X add: thisContext longStack.<br>
<br>
Or,<br>
<br>
  X add: { thisContext longStack. subViews copy }<br>
<br>
can sometimes give some clues.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Sat, Sep 13, 2014 at 11:35 PM, Casey Ransberger<br>
&lt;<a href="mailto:casey.obrien.r@gmail.com">casey.obrien.r@gmail.com</a>&gt; wrote:<br>
&gt; I&#39;ve been using MVC. It&#39;s still buggy, but mostly usable. I thought that if<br>
&gt; someone just used it for a little while, we&#39;d know where most of the worst<br>
&gt; bugs are.<br>
&gt;<br>
&gt; Currently tracking two issues, one with errors occurring after bringing up<br>
&gt; context menus (haven&#39;t started really digging on that one yet,) and a<br>
&gt; warning which appears for reasons unknown in the Transcript. This is about<br>
&gt; the latter.<br>
&gt;<br>
&gt; Warning: view contents not found.<br>
&gt;<br>
&gt; I spent probably ten minutes sifting through all of the methods containing<br>
&gt; the string &#39;Warning:&#39; when the whole string didn&#39;t turn up any hits, and I<br>
&gt; do think I have a lead.<br>
&gt;<br>
&gt; It looks like the latter issue is occurring in<br>
&gt; StandardSystemView&gt;&gt;setUpdatablePanesFrom:, but I&#39;m not sure why yet. The<br>
&gt; method itself seems pretty straightforward, but for some reason, the block<br>
&gt; temp aPane is ending up nil.<br>
&gt;<br>
&gt; If I&#39;m reading this right, aPane is assigned the value of sending<br>
&gt; #subViewSatisfying: to a StandardSystemView (in this case, self,) and the<br>
&gt; argument seems to be a block specifying a constraint, and I may as well<br>
&gt; paste in the send.<br>
&gt;<br>
&gt; aPane := self subViewSatisfying:<br>
&gt; [:pane | (pane isKindOf: PluggableListView) and: [pane getListSelector ==<br>
&gt; sel]].<br>
&gt;<br>
&gt; This happens right before the nil check, which probably means that the<br>
&gt; constraint doesn&#39;t match whatever #subViewSatisfying: searches (or<br>
&gt; #subViewSatisfying: is just borked.)<br>
&gt;<br>
&gt; View&gt;&gt;#subViewSatisfying: is trivial, and indeed returns nil on no-match.<br>
&gt; The variable subViews just doesn&#39;t have what the method is looking for. I<br>
&gt; set a breakpoint in order to learn what was actually in there, but alas: it<br>
&gt; doesn&#39;t repro when I&#39;m looking, which is more or less an &quot;all stop&quot; for me<br>
&gt; on this one.<br>
&gt;<br>
&gt; Does anyone know this code well?<br>
&gt;<br>
&gt; TIA,<br>
&gt;<br>
&gt; Casey<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
</div></div></blockquote></div><br></div>