[IDEA] 'buildNewMethods' Preference <...>
Helge Horch
Helge.Horch at munich.netsurf.de
Thu Nov 25 11:13:16 UTC 1999
At 17:29 24.11.99 -0800, Ali Chamas wrote:
>but i just thought it would be a handy way to begin
>the tangent coding tasks which occur while working.
>Also, the idea was kind of premature, thanks for the
>points.
Hmm, didn't sound too unreasonable to me... I wondered where I had heard
something similar before. Ah, here it is, quoted from
<http://c2.com/cgi/wiki?StubButton>:
> A blindingly simple optimization to Smalltalk's development environment
is to add
> a "Define" button to the Smalltalk walkback window that is active when
you get a
> "doesNotUnderstand" and the receiver is not nil. Press the button and the
system
> compiles a stub method for you with a halt in it and continues. --KentBeck
The intention is only slightly different, as Kent's button is supposed to
drive "just in time" programming.
HTH,
Helge
P.S. This is a quick hack during lunch, seems to work for me. So far.
Caveat emptor. ;)
!Debugger methodsFor: 'notifier menu' stamp: 'hh 11/25/1999 11:59'!
stub
"compile a stub method and continue"
| cls sel |
cls _ contextStackTop receiver class.
sel _ (contextStackTop at: 1) selector.
cls compile: sel printString, '
self halt'
classified: nil
notifying: nil.
self proceed! !
!Debugger methodsFor: 'context stack menu' stamp: 'hh 11/25/1999 11:32'!
debugProceedMenu: aMenu
| isDNU |
isDNU _ contextStackTop selector = #doesNotUnderstand:.
^ (isDNU and: [contextStackTop receiver notNil])
ifTrue: [aMenu labels:
'proceed
debug
stub'
lines: #()
selections: #(proceed debug stub)]
ifFalse: [aMenu labels:
'proceed
debug'
lines: #()
selections: #(proceed debug )]! !
More information about the Squeak-dev
mailing list
|