A Variety of Squeak-ish Questions
Ward Cunningham
ward at c2.com
Tue Jan 27 18:38:51 UTC 1998
> - I have some ordered collections that contain BlockContexts (e.g., the
> backup jobs list in PWS). When I inspect the collection, I just see
> "Undefined DoIt". If I inspect deeper, I can get to the bytecodes, but
> that's just a bit too far for me. Is there anyway to see what the original
> BlockContext looked like?
I once redefined BlockContext>>inspect to call up the debugger. I can't
remember what method I called, but I'm sure it was "private". The two
line hack gave me source for the defining method and even highlighted
the text of the block. To do this job right I should have defined a
variation of Debugger>>openOn: that would leave out useless panes and
menus. (I can't remember how well it handled obsolete DoIts, which may
be Mark's question.)
About this same time I stopped building blocks into long-lived
structures. I can't say that I've ever missed them. That reminds me of
another sweet little hack. Try defining value:value: for Symbol so that
#> can serve as a sortBlock for SortedCollection. Then try (1 to 100)
inject: 0 into: #+.
--
Ward Cunningham
v 503-245-5633 mailto:ward at c2.com
f 503-246-5587 http://c2.com/
More information about the Squeak-dev
mailing list
|