# # This file is encoded in (so called) SHIFT-JIS, # line delimitor is CR. # Gauge MVC Goodies for Squeak 1.31 Broken English description This goodies is a modification for Squeak from Mr. AOKI''s Gauge MVC Goodies for VisualWorks 2.5 and VisualWave 1.0 Copyright (c) 1995-1998 AOKI Atsushi 1998/01/05 http://www.sra.co.jp/people/aoki/SmalltalkGoodies/VisualWorks/Gauge.st http://www.sra.co.jp/people/aoki/SmalltalkGoodies/VisualWorks/Gauge.txt Summary: program. This Goodies is a gauge to handle a visualized numerical information on MVC style. How to install: FileIn this goodies and makes classes below in a category "Goodies-Gauge". GaugeController GaugeModel GaugeView This source adds no change to existing classes or methods. It completes within self. When you want to restore your image, please remove these classes "GaugeController", "GaugeModel", "GaugeView" from your system, simply. how to use: This pattern is to open a gauge on a window type. You can set values at minimum value, maximum value, number of scales, range. (GaugeModel value: 20) open (GaugeModel value: -20 range: #(-100 100 10 1)) open The pettern below is to open a gauge on a dialog. It uses for input a number with mouse. GaugeModel request: 20 GaugeModel request: -20 range: #(-100 100 10 5) Attention!! 1) This implementation of a dialog type gauge has curious behavior. For closing dialog, you must click button and mouse move away from a view holding these buttons. 2) GaugeModel(class)>>example2 doesn''t work. Because Squeak ignores any statement after to open some window. Instead of this, you can evaluate below, | gaugeModel | gaugeModel := GaugeModel value: -20 range: #(-100 100 10 1). gaugeModel inspect. ^gaugeModel At a inspector, type self open. (repeat as you like) and paste below, select, and do it!! [(Delay forMilliseconds: 1000) wait. -100 to: 100 do: [:n | (Delay forMilliseconds: 10) wait. self value: n]] fork. ########################################################## 青木さんの http://www.sra.co.jp/people/aoki/SmalltalkGoodies/VisualWorks/Gauge.st を Squeak 用にいじったものです。 ドキュメントは http://www.sra.co.jp/people/aoki/SmalltalkGoodies/VisualWorks/Gauge.txt を参照してください。 注意!! 1) ダイアログ型のゲージを出した場合、終了するには "Accept", "Cancel" いずれかのボタンをクリックしたあと、マウスをそのボタンが載っている ビューから外してください。そうしないと閉じません。 2) GaugeModel(class)>>example2 は、ちゃんと動きません。最初の gaugeModel open. を実行したあと、後続する statement は実行されないようです。回避する 方法は、不明です。 だもんで、とりあえず下記で試してみてください。 | gaugeModel | gaugeModel := GaugeModel value: -20 range: #(-100 100 10 1). gaugeModel inspect. ^gaugeModel でインスペクタを開きます。その中で self open. (repeat as you like) で、好きなだけゲージを開きます。 [(Delay forMilliseconds: 1000) wait. -100 to: 100 do: [:n | (Delay forMilliseconds: 10) wait. self value: n]] fork. で、アニメーションを観ることができます。 ---------------------------------------------------------- 西原聡士 (NISHIHARA Satoshi) e-mail: mailto:nishis@zephyr.dti.ne.jp URL: http://www.zephyr.dti.ne.jp/~nishis/ ----------------------------------------------------------