Vassili,
that's great!
I just wanted to write a reply to Lex assert suggestion to say that it would be nice if assert on/off would be considered at compile time and not only at run time. But I thought I had to check the other mails first and now:
Thank you!
Stephan
Vassili Bykov wrote:
From: Lex Spoon [mailto:lex@cc.gatech.edu] [...] For internal checks like you describe, it would be cool if Squeak had a global assert: function:
Here is a "deluxe" version of #assert. It inlines (or omits) assertion code and recompiles all methods that have inlined assertions once the inline setting changes. It is similar to the #assert: I wrote for VW a few years ago, except this time I though making #assert look like a message sent to a block is a better thing.
It does not use Preferences as you suggested in your post, just use "MessageNode inlineAsserts: <aBoolean>". I guess I could have modified #noteThatFlag:justChangedTo: in Preferences class to give UI access to it but I hate overriding existing methods in change sets. There is little choice with MessageNode class>>initialize, of course.
--Vassili
Name: Assert.1.cs
Assert.1.cs Type: unspecified type (application/octet-stream) Encoding: quoted-printable
squeak-dev@lists.squeakfoundation.org