# # This file is encoded in (so called) SHIFT-JIS, # line delimitor is CR. # Encyclopedia Goodies for Squeak 2.0 (Encyclopedia methodsFor: ''html methods'' methodHtmlForClass: aClass selector: aSymbol on: aStream fixed by the Most Revd AOKI Atsushi, Fri, 10 Apr 1998 17:12:35 +0900) Broken English description This goodies is a modification for Squeak from Mr. AOKI's Encyclopedia 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/Encyclo.st Summary: This goodies makes html files of the classes you want to get from virtual image. So you can browse it with WebBrowser (NetscapeNavigator, InternetExplorer etc). Each html file contains suitable links, anchors. It is an Encyclopedia (handbook) including table of contents, index file. Installing: FileIn this goodies and makes a class "Encyclopedia" in a category "Goodies-Encyclopedia". When you want to restore your image, please remove this class "Encyclopedia" from your system. Image will be restored. how to use: Making an Encyclopedia which target is all classes exist on your image: do it the program below | collection encyclopedia | collection := IdentitySet new. Smalltalk allBehaviorsDo: [:aClass | aClass isMeta ifFalse: [collection add: aClass]]. encyclopedia := Encyclopedia classes: collection. encyclopedia generate. ^encyclopedia It takes a long time to finish. When all is over, the files are placed in current directory like that Encyclopedia/ images/ dot1.gif : dot9.gif index.gif xrefs.gif index.htm htmls/ classname.htm files many as number of classes exist on your image xrefs.htm xrefA.htm : xrefZ.htm Open "index.htm" in Encyclopedia directory with WebBrowser (NetscapeNavigator, InternetExplorer etc). Also, you can include source program within the Encyclopedia. For example, you can get an Encyclopedia which is classes under Number within each source program, do it below. | encyclopedia | encyclopedia := Encyclopedia classes: Number withAllSubclasses. encyclopedia sourceInclusion: true. encyclopedia generate. ^encyclopedia You can browse the source program with WebBrowser insted of using SystemBrowser on Smalltalk. *** caution!! *** When you do it which target is all classes exist on your image like example4 or example8, you will be warned that "Space is low". In that case, please 6MB or more plus for your VM memory. At default, VM memory size is 7205KB. So it should be assigned at 13312KB or more is better. Some examples take very long time to finish. For example, example4: about 21 min example8: about 32 min to complete. There are 521 classes, 12072 methods on PowerMacintosh 8500/120 with 750/233 Processor Card. ########################################################## 青木さんの http://www.sra.co.jp/people/aoki/SmalltalkGoodies/VisualWorks/Encyclo.st を Squeak 用にいじったものです。 ドキュメントは http://www.sra.co.jp/people/aoki/SmalltalkGoodies/VisualWorks/Encyclo.txt を参照してください。 *** 注意事項 *** 例題 4, 8 等全クラスを対象にしたものは、途中で "Space is low" 警告が 出現して、先へ進めないことがあります。その場合は、とりあえず、割当メ モリを最低 6MB 以上増やすと動かせるようになります。 また、例題 4, 8 等全クラスを対象にしたものは、完了までにけっこうな 時間が掛かります。521 のクラス、12072 のメソッドを持つ現イメージで 走らせてみたところ、 example4: 約 21 分 example8: 約 32 分 を要しました。 PowerMacintosh 8500/120 with 750/233 Processor Card. ---------------------------------------------------------- 西原聡士 (NISHIHARA Satoshi) e-mail: mailto:nishis@zephyr.dti.ne.jp URL: http://www.zephyr.dti.ne.jp/~nishis/ ----------------------------------------------------------