Nicer haltOnce


Yesterday we improved #haltOnce to be more like a “once” BreakPoint:

	-> state per *each* haltOnce send
		(this means you can put two in one method and they are independent)
	-> when putting a haltOnce, it is enabled by default
	-> The global menu entry just resets all haltOnce to be active again.

Interesting is how trivial this was to implement… in class Halt 
    | node |
    node := thisContext sender sender sourceNodeExecuted.
    (node hasProperty: #haltOnce) ifTrue: [^self]. 
    node propertyAt: #haltOnce put: true.
    ^ self signal.

This means, we get the AST node of the “haltOnce” message send. Then we put an annotation there.
To reset all (enable all), the global many just does:

	#haltOnce senders do: #recompile.


This will be in 60082.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: