# # This file is encoded in (so called) SHIFT-JIS, # line delimitor is CR. # BlockContext Modifier Goodies for Squeak 1.31, 2.0 Broken English description Summary: This code adds "fake unwinding" for Squeak. Installing: FileIn this source code, and makes a class "BlockContextModifier" in a category "Nishis-Goodies-Misc". AND 2 methods are added in a category "fake unwinding" of the class "BlockContext". BlockContext>>ensure: BlockContext>>valueNowOrOnUnwindDo: When you want to restore your image, please remove this class "BlockContextModifier" from your system. Additions of BlockContext class are automatically remevoed and restored. The pattern of [modify-restore] is following Mr. AOKI. See the attachment file (matsuda.zip) of http://www.sra.co.jp/smalltalk/SML/mails/1501-1600/1552.txt how to use: see examples. ########################################################## 概要: 青木さんの『イディオム』p.117, および『サクサク Smalltalk』 p.176 に valueNowOrOnUnwindDo: の解説が載っていて、これを Squeak に入れちゃろうと思いつきました。SmalltalkAgents, Smalltalk/V では ensure: となっているやつです。 http://www.sra.co.jp/smalltalk/SML/mails/2001-2100/2046.txt 結局「巻き戻し」もがきにしかなっていませんが、ないよりかは マシ……かも知れません。 インストール方法: このソースを読み込んで(fileInして)下さい。 Nishis-Goodies-Misc というカテゴリの中に BlockContextModifier というクラスが作成され、BlockContext クラスに、 fake unwinding というプロトコルが追加されます。このプロトコルは、 BlockContext>>ensure: BlockContext>>valueNowOrOnUnwindDo: という 2 つのメソッドを持っています。 元に戻したい場合には, BlockContextModifier というクラスを 削除して下さい。 [変更-復帰]のパタンは、青木さんが作成されたプログラム (matsuda.zip) がオリジナルです。 http://www.sra.co.jp/smalltalk/SML/mails/1501-1600/1552.txt に添付されている attachment ファイルを参照してください。 使い方: 例題を参照してください。 ---------------------------------------------------------- 西原聡士 (NISHIHARA Satoshi) e-mail: mailto:nishis@zephyr.dti.ne.jp URL: http://www.zephyr.dti.ne.jp/~nishis/ ----------------------------------------------------------