<?xml version="1.0"?>

<st-source>
<!-- 
Name: CADSM-DEV
HideSource: false
PackageName: CADSM-DEV
Parcel: #('cadsmdev')
SaveSource: true
Date: 9:12:55 am September 28, 2009
 -->
<time-stamp>From VisualWorks®, 7.5 of April 16, 2007 on September 28, 2009 at 9:12:55 am</time-stamp>


<do-it>(Dialog confirm: 'You are filing-in a Parcel source file!\\While this is possible it will not have\the same effect as loading the parcel.\None of the Parcel''s prerequisites will\be loaded and none of its load actions\will be performed.\\Are you sure you want to file-in?' withCRs) ifFalse: [self error: 'Parcel file-in abandoned.  Choose terminate or close.']</do-it>

<methods>
<class-id>Core.Object</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="deleteDebugTxt">deleteDebugTxt
	"self deleteDebugTxt. "

	| fn |
	fn := self aDebugTxt asFilename.
	fn definitelyExists ifTrue: [fn delete]</body>

<body package="CADSM-DEV" selector="showObject:ContextDepth:">showObject: aObject ContextDepth: i 
	| offset |
	offset := 2.
	self 
		showObject: aObject
		ContextFrom: offset
		to: offset + i - 1</body>
</methods>

<methods>
<class-id>Security.RSAKeyGenerator class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="doc">doc
	"RSA key generation is time consuming."

	"Encryption and decryption are fast."

	"Message length is limited. keySize n*8 bits. Shortest is 10 bytes. Longest is (n-11) bytes."

	"Applies to String or ByteArray only."

	"Decoding of invalid encrypted message raises DecodingError."

	^self commentOnly</body>
</methods>

<methods>
<class-id>Core.Object</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="toTranscriptShow:with:">toTranscriptShow: aString with: aObject 
	Transcript
		cr;
		show: (aString expandMacrosWith: aObject)</body>

<body package="CADSM-DEV" selector="showObject:ProbeContextDepth:">showObject: aObject ProbeContextDepth: i 
	| offset |
	offset := 6.
	self 
		showObject: aObject
		ContextFrom: offset
		to: offset + i - 1</body>
</methods>

<methods>
<class-id>Security.RSAKeyGenerator class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example2">example2
	"self example2"

	| rsa aRSAPublicKey aRSAPrivateKey encryptedBytes plainMessageBytes |
	Time millisecondsToRun: 
			[rsa := RSAKeyGenerator keySize: 96 * 8.
			rsa flush.
			aRSAPublicKey := rsa publicKey.
			aRSAPrivateKey := rsa privateKey].
	Time millisecondsToRun: 
			[encryptedBytes := (RSA new)
						publicKey: aRSAPublicKey;
						encrypt: '123456789012345678901234567890123456789012345678901234567890' 
									asByteArray.
			encryptedBytes inspect].
	Time millisecondsToRun: 
			[plainMessageBytes := (RSA new)
						privateKey: aRSAPrivateKey;
						decrypt: encryptedBytes.
			plainMessageBytes asByteString inspect]</body>
</methods>

<methods>
<class-id>Core.Object</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="toDebugTxtShowString:">toDebugTxtShowString: aString 
	"self toDebugTxtShowString: 'testing'. "

	| stream |
	stream := self aDebugTxt asFilename readAppendStream.
	[stream nextPutAll: aString] ensure: [stream close]</body>
</methods>

<methods>
<class-id>Security.RSA class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example2">example2
	"self example2"

	"Bug? RSA cannot decrypt messages less than 10 bytes long. Fixed in VW7.3."

	| string nByte nBit aKeyGen aRSAPublicKey aRSAPrivateKey encryptedBytes decryptedBytes decryptedString |
	string := '123456789'.
	"	string := '123456789012345678901234567890123456789012345678901234567890'."
	nByte := 64.
	nBit := nByte * 8.
	aKeyGen := RSAKeyGenerator keySize: nBit.
	aRSAPublicKey := aKeyGen publicKey.
	aRSAPrivateKey := aKeyGen privateKey.
	encryptedBytes := (RSA new)
				publicKey: aRSAPublicKey;
				encrypt: string asByteArray.
	encryptedBytes inspect.
	decryptedBytes := (RSA new)
				privateKey: aRSAPrivateKey;
				decrypt: encryptedBytes.
	decryptedString := decryptedBytes asByteString.
	decryptedString inspect.
	string = decryptedString ifFalse: [Dialog warn: 'Cryptography error.']</body>
</methods>

<methods>
<class-id>Core.SequenceableCollection class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example3b">example3b
	"self example3b."

	| string |
	string := '12345678901234567890'.
	(string breakIntoSizeOf: 7 padWith: Character space) 
		concatenateCollections inspect.
	(string breakIntoSizeOf: 14 padWith: Character space) 
		concatenateCollections inspect.
	(string breakIntoSizeOf: 21 padWith: Character space) 
		concatenateCollections inspect</body>
</methods>

<methods>
<class-id>Core.Date class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example2">example2
	"self example2"

	^Compiler evaluate: self example1</body>
</methods>

<methods>
<class-id>Core.Object</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="assert:do:">assert: aBlock do: doBlock 
	aBlock value ifFalse: [self halt: 'Check this.'].
	^doBlock value</body>
</methods>

<methods>
<class-id>Security.RSA class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example3">example3
	"self example3"

	"Bug? RSA cannot decrypt messages less than 10 bytes long. Solve by padding for now."

	"	string := '123456789'."

	| string nByte nBit aKeyGen aRSAPublicKey aRSAPrivateKey aRSALengthLimit paddedString encryptedBytes decryptedBytes decryptedString |
	string := '123456789012345678901234567890123456789012345678901234567890'.
	nByte := 64.
	nBit := nByte * 8.
	aKeyGen := RSAKeyGenerator keySize: nBit.
	aRSAPublicKey := aKeyGen publicKey.
	aRSAPrivateKey := aKeyGen privateKey.
	aRSALengthLimit := nByte - 11.
	paddedString := (string breakIntoSizeOf: aRSALengthLimit
				padWith: Character space) concatenateCollections.
	encryptedBytes := (RSA new)
				publicKey: aRSAPublicKey;
				encryptLong: paddedString asByteArray.
	encryptedBytes inspect.
	decryptedBytes := (RSA new)
				privateKey: aRSAPrivateKey;
				decryptLong: encryptedBytes.
	decryptedString := decryptedBytes asByteString.
	decryptedString inspect.
	paddedString = decryptedString 
		ifFalse: [Dialog warn: 'Cryptography error.']</body>
</methods>

<methods>
<class-id>Core.SequenceableCollection class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example3">example3
	"self example3."

	| string1 string2 string3 string4 |
	string1 := '1234567890'.
	string2 := '123456789012345'.
	string3 := '678901234567890'.
	string4 := '12345678901234567890'.
	^(Array 
		with: string1
		with: string2
		with: string3
		with: string4) concatenateCollections</body>
</methods>

<methods>
<class-id>Core.Date class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example3">example3
	"self example3."

	Date 
		newDay: 1
		month: #Mar
		year: 2004.
	Date dateAndTimeNow.
	Date readFrom: '5 April 1982' readStream.
	Date readFrom: '5-APR-82' readStream.
	Date readFrom: 'April 5, 1982' readStream.
	Date readFrom: '2/29/82' readStream.
	(Date readFrom: '8/12/2004' readStream) isLeapYear.
	(Date readFrom: '2/29/2004' readStream) isLeapDay.
	(Date readFrom: '2/29/2004' readStream) addYears: 2.
	(Date readFrom: '3/29/2004' readStream) addYears: 2.
	(Date readFrom: '1/29/2004' readStream) addYears: 2.
	(Date readFrom: '2/29/2004' readStream) addYears: 4.
	(Date readFrom: '3/29/2004' readStream) addYears: 4.
	(Date readFrom: '1/29/2004' readStream) addYears: 4.
	(Date readFrom: '2/29/2004' readStream) subtractYears: 2.
	(Date readFrom: '3/29/2004' readStream) subtractYears: 2.
	(Date readFrom: '1/29/2004' readStream) subtractYears: 2.
	(Date readFrom: '2/29/2004' readStream) subtractYears: 4.
	(Date readFrom: '3/29/2004' readStream) subtractYears: 4.
	(Date readFrom: '1/29/2004' readStream) subtractYears: 4</body>
</methods>

<methods>
<class-id>Core.Time class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example1">example1
	"Time example1."

	Time microsecondClock.
	Time secondClock</body>
</methods>

<methods>
<class-id>Core.Timestamp class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example1">example1
	"Timestamp example1."

	Timestamp now.
	Timestamp fromSeconds: 0.
	Timestamp new fromSeconds: 0.
	Timestamp new setFromMicroseconds: 0.
	Time aTime: 0</body>
</methods>

<methods>
<class-id>Security.RSA class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example4">example4
	"self example4"

	| rsa aRSAPublicKey aRSAPrivateKey encryptedBytes plainMessageBytes |
	rsa := RSAKeyGenerator keySize: 64 * 8.
	rsa flush.
	aRSAPublicKey := rsa publicKey.
	aRSAPrivateKey := rsa privateKey.
	encryptedBytes := (RSA new)
				publicKey: aRSAPublicKey;
				encryptLong: '123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' 
							asByteArray.
	encryptedBytes inspect.
	plainMessageBytes := (RSA new)
				privateKey: aRSAPrivateKey;
				decryptLong: encryptedBytes.
	plainMessageBytes asByteString inspect</body>
</methods>

<methods>
<class-id>Core.Object</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="toTranscriptShow:ifOverOne:">toTranscriptShow: aString ifOverOne: aDouble 
	aDouble &gt; 1.0d 
		ifTrue: 
			[Transcript
				cr;
				show: (aString expandMacrosWith: aDouble)]</body>
</methods>

<methods>
<class-id>Core.SequenceableCollection class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example1">example1
	"self example1."

	| string |
	string := '12345678901234567890'.
	(string breakIntoSizeOf: 7) inspect.
	(string breakIntoSizeOf: 14) inspect.
	(string breakIntoSizeOf: 21) inspect</body>
</methods>

<methods>
<class-id>Core.Date class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example1">example1
	"self example1"

	| stream |
	stream := (String new: 100) writeStream.
	Date today storeOn: stream.
	^stream contents</body>
</methods>

<methods>
<class-id>Core.Object</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="showContextFrom:to:">showContextFrom: i to: j 
	| stackStream ctx count |
	stackStream := WriteStream on: (String new: 400).
	stackStream cr.
	stackStream nextPutAll: Timestamp now printString.
	ctx := thisContext.
	count := 1.
	[ctx notNil and: [count &lt;= j]] whileTrue: 
			[count &gt;= i 
				ifTrue: 
					[stackStream
						cr;
						print: ctx].
			ctx := ctx sender.
			count := count + 1].
	Transcript
		cr;
		show: stackStream contents</body>
</methods>

<methods>
<class-id>Security.RSA class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="doc">doc
	"RSA key generation is time consuming."

	"Encryption and decryption are fast."

	"Message length is limited. keySize n*8 bits. Shortest is 0 bytes. Longest is (n-11) bytes."

	"Applies to String or ByteArray only."

	"Decoding of invalid encrypted message raises DecodingError."

	^self commentOnly</body>
</methods>

<methods>
<class-id>Core.SequenceableCollection class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example3a">example3a
	"self example3a."

	| string |
	string := '12345678901234567890'.
	(string breakIntoSizeOf: 7) concatenateCollections inspect.
	(string breakIntoSizeOf: 14) concatenateCollections inspect.
	(string breakIntoSizeOf: 21) concatenateCollections inspect</body>
</methods>

<methods>
<class-id>Core.Object class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="exampleMisc">exampleMisc
	"self exampleMisc."

	(1 @ 2) basicSize.
	(1 @ 2) class instSize.
	(Array new: 3) basicSize.
	(Array new: 3) class instSize.
	(Circle center: 0.5 @ 0.5 radius: 0.5) basicSize.
	(Circle center: 0.5 @ 0.5 radius: 0.5) class instSize.
	Object subclasses.
	self toTranscriptShow: 'CADColorDialog class example1.'.
	self showContextDepth: 10.
	Object name.
	(Object allSubclasses 
		select: [:class | ('MbD*' match: class name ignoreCase: false) and: [class isMeta not]]) 
			do: [:class | class relocateTo: StCAD.StMbD].
	Object subclasses select: [:class | class isVariable].
	((Object allSubclasses select: [:class | class isVariable]) 
		collect: [:class | class name]) asSortedCollection</body>
</methods>

<methods>
<class-id>Core.Object</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="toTranscriptShow:">toTranscriptShow: aObject 
	Transcript
		cr;
		show: aObject printString</body>
</methods>

<methods>
<class-id>Kernel.BinaryObjectStorage class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example2">example2
	"self example2."

	| filepath bos |
	filepath := 'date.bos'.
	bos := BinaryObjectStorage onNew: filepath asFilename writeStream.
	
	[bos nextPut: Date today.
	bos nextPut: 'Aik-Siong Koh'] 
			ensure: [bos close].
	bos := BinaryObjectStorage onOldNoScan: filepath asFilename readStream.
	^[bos contents] valueNowOrOnUnwindDo: [bos close]</body>
</methods>

<methods>
<class-id>Core.Object</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="assert:">assert: aBlock 
	aBlock value ifFalse: [self halt: 'Check this.']</body>
</methods>

<methods>
<class-id>Tools.FileBrowser class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="renameFilesInDir">renameFilesInDir
	"FileBrowser renameFilesInDir"

	| dirName cFile tail newFilename aFilename |
	dirName := 'C:\Documents and Settings\LapTop4\Local Settings\Application Data\Mozilla\Profiles\default\Cache\dummy' 
				asFilename.
	cFile := dirName filesMatching: '*'.
	cFile do: 
			[:aFile | 
			aFilename := aFile asFilename.
			aFilename extension ifNil: 
					[tail := aFile asFilename tail , '.jpg'.
					newFilename := dirName construct: tail.
					aFilename renameTo: newFilename]]</body>
</methods>

<methods>
<class-id>Kernel.BinaryObjectStorage class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example1a">example1a
	"self example1a."

	"By default, BOSS stores the source code for methods, the class comment, and the protocols. To control whether source code is stored with a class, send a sourceMode: message to the binary stream before storing the classes. The argument is either #discard, to omit source code, or #keep, to include source code."

	| filepath bos |
	filepath := 'dummy.bos'.
	bos := Kernel.BinaryObjectStorage onNew: filepath asFilename writeStream.
	[bos nextPutClasses: (Array with: CADSM.UI.RegistrationDialog)] 
		ensure: [bos close]</body>
</methods>

<methods>
<class-id>Core.Object</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="showContextDepth:">showContextDepth: i 
	| offset |
	offset := 1.
	self showContextFrom: offset to: offset + i - 1</body>
</methods>

<methods>
<class-id>Security.ThirtyTwoBitRegister class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example1">example1
	"self example1."

	"This used caused an exception in ThirtyTwoBitRegister&gt;&gt;= in VW7.2.1."

	| nByte nBit aKeyGenClass aKeyGen1 wStream |
	nByte := 96.
	nBit := nByte * 8.
	aKeyGenClass := Security.RSAKeyGenerator.
	aKeyGen1 := aKeyGenClass keySize: nBit.
	aKeyGen1 generateKeys.
	wStream := (String new: 1000) writeStream.
	aKeyGen1 storeOn: wStream.
	^wStream contents</body>
</methods>

<methods>
<class-id>Kernel.Scanner class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example1">example1
	"Scanner example1"

	| aScanner |
	aScanner := Scanner new.
	aScanner 
		breakIntoTokens: 'http://freshmeat.net/search/?q=3d+cad&amp;section=projects&amp;Go.x=0&amp;Go.y=0'</body>
</methods>

<methods>
<class-id>Kernel.CompiledCode</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="getSourceForUserIfNone:">getSourceForUserIfNone: aBlock 
	"Answer the string corresponding to the source code for the argument.
	If source code is not available, answer the result of evaluating aBlock."

	| newSource index |
	InputState default shiftDown ifTrue: [^aBlock value].	"Added by A-S Koh for debugging Parser methods."
	newSource := self getSource.
	newSource == nil ifTrue: [^aBlock value].	"no stored source"
	(newSource at: newSource size) isSeparator 
		ifTrue: 
			[index := newSource size.	"tidy up for file out"
			
			[(newSource at: index) isSeparator 
				and: [index &gt; 1 and: [(newSource at: index - 1) ~~ $$]]] 
					whileTrue: [index := index - 1].
			newSource := newSource copyFrom: 1 to: index].
	^newSource</body>
</methods>

<methods>
<class-id>Core.Object</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="toFile:Show:">toFile: filepath Show: aObject 
	"self toFile: 'debug.txt' show: 'testing'. "

	| stream |
	stream := filepath asFilename readAppendStream.
	
	[stream
		cr;
		nextPutAll: aObject printString] ensure: [stream close]</body>
</methods>

<methods>
<class-id>Kernel.BinaryObjectStorage class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example1">example1
	"self example1."

	"By default, BOSS stores the source code for methods, the class comment, and the protocols. To control whether source code is stored with a class, send a sourceMode: message to the binary stream before storing the classes. The argument is either #discard, to omit source code, or #keep, to include source code."

	| stream bos |
	stream := (ByteArray new: 1000) readWriteStream.
	bos := BinaryObjectStorage onNew: stream.
	bos nextPutClasses: (Array with: CADSM.UI.RegistrationDialog).
	^bos</body>
</methods>

<methods>
<class-id>Core.Object</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="showObject:ContextFrom:to:">showObject: aObject ContextFrom: i to: j 
	| stackStream ctx count |
	stackStream := WriteStream on: (String new: 400).
	stackStream cr.
	stackStream nextPutAll: Timestamp now printString.
	stackStream cr.
	stackStream nextPutAll: aObject printString.
	ctx := thisContext.
	count := 1.
	[ctx notNil and: [count &lt;= j]] whileTrue: 
			[count &gt;= i 
				ifTrue: 
					[stackStream
						cr;
						print: ctx].
			ctx := ctx sender.
			count := count + 1].
	Transcript
		cr;
		show: stackStream contents</body>
</methods>

<methods>
<class-id>Security.MD5 class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example1">example1
	"self example1"

	MD5 hash: 'aaa'.
	MD5 hashFrom: 'vxxa.im' asFilename readStream</body>
</methods>

<methods>
<class-id>Core.Object</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="toDebugTxtShowContextFrom:to:">toDebugTxtShowContextFrom: i to: j 
	| stackStream ctx count |
	stackStream := WriteStream on: (String new: 400).
	stackStream cr.
	stackStream nextPutAll: Timestamp now printString.
	ctx := thisContext.
	count := 1.
	[ctx notNil and: [count &lt;= j]] whileTrue: 
			[count &gt;= i 
				ifTrue: 
					[stackStream
						cr;
						print: ctx].
			ctx := ctx sender.
			count := count + 1].
	self toDebugTxtShow: stackStream contents</body>

<body package="CADSM-DEV" selector="toDebugTxtShow:">toDebugTxtShow: aObject 
	"self toDebugTxtShow: 'testing'. "

	self toFile: self aDebugTxt Show: aObject</body>
</methods>

<methods>
<class-id>Tools.SmalltalkWorkbench class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="exampleMisc">exampleMisc
	"self exampleMisc."

	SmalltalkWorkbench promptThenBrowseMethodsInProtocolFrom: nil
	"'koh', 'MbD', 'CAD', 'DYN', 'StMath', 'StDoc', 'StGeo', 'PDMS', 'UI', 'FEM', 'NMT', 'StGeo', 'CADSM'"</body>
</methods>

<methods>
<class-id>Core.Object</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="printOn1:">printOn1: aStream 
	| printLimit |
	printLimit := 5000.
	aStream position &lt; printLimit 
		ifTrue: 
			[aStream nextPut: $a.
			aStream nextPutAll: self class printString.
			aStream nextPut: $(.
			1 to: self class instSize
				do: 
					[:i | 
					aStream
						print: (self instVarAt: i);
						space].
			1 to: self basicSize
				do: 
					[:i | 
					aStream
						print: (self at: i);
						space].
			aStream nextPut: $).
			aStream position &gt; printLimit 
				ifTrue: [aStream nextPutAll: (#'...etc...' &lt;&lt; #'CADSM.UI') expandMacros]]</body>

<body package="CADSM-DEV" selector="aDebugTxt">aDebugTxt
	^Filename findDefaultDirectory asString , '\debug.txt'</body>
</methods>

<methods>
<class-id>Security.RSAKeyGenerator class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example1">example1
	"self example1"

	| rsa |
	rsa := RSAKeyGenerator keySize: 96 * 8.
	rsa flush.
	^rsa</body>
</methods>

<methods>
<class-id>Core.Object</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="showProbeContextDepth:">showProbeContextDepth: i 
	| offset |
	offset := 6.
	self showContextFrom: offset to: offset + i - 1</body>
</methods>

<methods>
<class-id>Core.SequenceableCollection class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="example2">example2
	"self example2."

	| string |
	string := '12345678901234567890'.
	(string breakIntoSizeOf: 7 padWith: Character space) inspect.
	(string breakIntoSizeOf: 14 padWith: Character space) inspect.
	(string breakIntoSizeOf: 21 padWith: Character space) inspect</body>
</methods>

<methods>
<class-id>Tools.ModuleHolderDialog class</class-id> <category>koh</category>

<body package="CADSM-DEV" selector="windowSpec">windowSpec
	"Tools.UIPainter new openOnClass: self andSelector: #windowSpec"

	&lt;resource: #canvas&gt;
	^#(#{UI.FullSpec} 
		#window: 
		#(#{UI.WindowSpec} 
			#label: 
			#(#{Kernel.UserMessage} 
				#key: #Select 
				#defaultString: 'Select' 
				#catalogID: #labels ) 
			#min: #(#{Core.Point} 20 20 ) 
			#max: #(#{Core.Point} 1024 768 ) 
			#bounds: #(#{Graphics.Rectangle} 513 337 993 817 ) ) 
		#component: 
		#(#{UI.SpecCollection} 
			#collection: #(
				#(#{UI.ActionButtonSpec} 
					#layout: #(#{Graphics.LayoutFrame} -90 1 -35 1 -10 1 -10 1 ) 
					#name: #cancelButton 
					#model: #cancel 
					#label: 
					#(#{Kernel.UserMessage} 
						#key: #Cancel 
						#defaultString: 'Cancel' 
						#catalogID: #labels ) 
					#defaultable: true ) 
				#(#{UI.ActionButtonSpec} 
					#layout: #(#{Graphics.LayoutFrame} -180 1 -35 1 -100 1 -10 1 ) 
					#name: #okButton 
					#model: #accept 
					#label: 
					#(#{Kernel.UserMessage} 
						#key: #OK 
						#defaultString: 'OK' 
						#catalogID: #labels ) 
					#isDefault: true 
					#defaultable: true ) 
				#(#{UI.SubCanvasSpec} 
					#layout: #(#{Graphics.LayoutFrame} 10 0 10 0 -10 1 -40 1 ) 
					#name: #module 
					#flags: 0 
					#clientKey: #module ) ) ) )</body>
</methods>

<methods>
<class-id>Tools.Workspace class</class-id> <category>resources</category>

<body package="CADSM-DEV" selector="menuBar">menuBar
	"Tools.MenuEditor new openOnClass: self andSelector: #menuBar"

	&lt;resource: #menu&gt;
	^#(#{UI.Menu} #(
			#(#{UI.MenuItem} 
				#rawLabel: 
				#(#{Kernel.UserMessage} 
					#key: #_File 
					#defaultString: '&amp;File' 
					#catalogID: #menus ) 
				#nameKey: #fileMenu 
				#submenu: #(#{UI.Menu} #(
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_New 
								#defaultString: '&amp;New' 
								#catalogID: #menus ) 
							#nameKey: #fileNew 
							#value: #fileNew 
							#shortcutKeyCharacter: $N 
							#shortcutModifiers: 2 
							#labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #fileNew ) ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_OpenDot 
								#defaultString: '&amp;Open...' 
								#catalogID: #menus ) 
							#nameKey: #fileOpen 
							#value: #fileOpen 
							#shortcutKeyCharacter: $O 
							#shortcutModifiers: 2 
							#labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #fileOpen ) ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_Save 
								#defaultString: '&amp;Save' 
								#catalogID: #menus ) 
							#nameKey: #fileSave 
							#value: #fileSave 
							#enablementSelector: #isAtTextPage 
							#shortcutKeyCharacter: $S 
							#shortcutModifiers: 2 
							#labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #fileSave ) ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #Save_AsDot 
								#defaultString: 'Save &amp;As...' 
								#catalogID: #menus ) 
							#nameKey: #fileSaveAs 
							#value: #fileSaveAs 
							#enablementSelector: #isAtTextPage ) ) #(1 3 ) nil ) ) 
			#(#{UI.MenuItem} 
				#rawLabel: 
				#(#{Kernel.UserMessage} 
					#key: #_Edit 
					#defaultString: '&amp;Edit' 
					#catalogID: #menus ) 
				#nameKey: #editMenu 
				#submenu: #(#{UI.Menu} #(
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_Undo 
								#defaultString: '&amp;Undo' 
								#catalogID: #menus ) 
							#nameKey: #editUndo 
							#value: #undo 
							#enablementSelector: #canUndo 
							#shortcutKeyCharacter: $Z 
							#shortcutModifiers: 2 ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #Cu_t 
								#defaultString: 'Cu&amp;t' 
								#catalogID: #menus ) 
							#nameKey: #editCut 
							#value: #cut 
							#enablementSelector: #isAtTextPage 
							#shortcutKeyCharacter: $X 
							#shortcutModifiers: 2 
							#labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #cut ) ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_Copy 
								#defaultString: '&amp;Copy' 
								#catalogID: #menus ) 
							#nameKey: #editCopy 
							#value: #copySelection 
							#shortcutKeyCharacter: $C 
							#shortcutModifiers: 2 
							#labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #copy ) ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_Paste 
								#defaultString: '&amp;Paste' 
								#catalogID: #menus ) 
							#nameKey: #editPaste 
							#value: #paste 
							#shortcutKeyCharacter: $V 
							#shortcutModifiers: 2 
							#labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #paste ) ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_FindDots 
								#defaultString: '&amp;Find...' 
								#catalogID: #menus ) 
							#nameKey: #editFind 
							#value: #find ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_ReplaceDots 
								#defaultString: '&amp;Replace...' 
								#catalogID: #menus ) 
							#nameKey: #editReplace 
							#value: #replace ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #Select_All 
								#defaultString: 'Select &amp;All' 
								#catalogID: #menus ) 
							#nameKey: #editSelectAll 
							#value: #selectAll ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_Encoding 
								#defaultString: '&amp;Encoding' 
								#catalogID: #menus ) 
							#nameKey: #editEncoding ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #Boss_InDot 
								#defaultString: 'Boss &amp;In...' 
								#catalogID: #menus ) 
							#value: #bossIn 
							#enablementSelector: #canBOSSObjects ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #Boss_OutDot 
								#defaultString: 'Boss &amp;Out...' 
								#catalogID: #menus ) 
							#value: #bossOut 
							#enablementSelector: #canBOSSObjects ) ) #(1 3 2 1 1 2 ) nil ) ) 
			#(#{UI.MenuItem} 
				#rawLabel: 
				#(#{Kernel.UserMessage} 
					#key: #_Smalltalk 
					#defaultString: '&amp;Smalltalk' 
					#catalogID: #menus ) 
				#nameKey: #smalltalkSubmenu 
				#submenu: #(#{UI.Menu} #(
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_DoIt 
								#defaultString: '&amp;Do it' 
								#catalogID: #menus ) 
							#value: #smalltalkDoIt 
							#shortcutKeyCharacter: $D 
							#shortcutModifiers: 2 
							#labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #doIt ) ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_PrintIt 
								#defaultString: '&amp;Print it' 
								#catalogID: #menus ) 
							#value: #smalltalkPrintIt 
							#shortcutKeyCharacter: $P 
							#shortcutModifiers: 2 
							#labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #printIt ) ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_InspectIt 
								#defaultString: '&amp;Inspect it' 
								#catalogID: #menus ) 
							#value: #smalltalkInspectIt 
							#shortcutKeyCharacter: $Q 
							#shortcutModifiers: 2 
							#labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #inspectIt ) ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #De_bugIt 
								#defaultString: 'De&amp;bug it' 
								#catalogID: #menus ) 
							#value: #smalltalkDebugIt 
							#shortcutKeyCharacter: $B 
							#shortcutModifiers: 2 
							#labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #debugIt ) ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_NamespacesDot 
								#defaultString: '&amp;Namespaces...' 
								#catalogID: #menus ) 
							#value: #editImports 
							#labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #namespaces ) ) ) #(4 1 ) nil ) ) 
			#(#{UI.MenuItem} 
				#rawLabel: 
				#(#{Kernel.UserMessage} 
					#key: #_View 
					#defaultString: '&amp;View' 
					#catalogID: #menus ) 
				#nameKey: #viewSubmenu 
				#submenu: #(#{UI.Menu} #(
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_Text 
								#defaultString: '&amp;Text' 
								#catalogID: #menus ) 
							#nameKey: #pageText 
							#value: #showTextPage ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_Variables 
								#defaultString: '&amp;Variables' 
								#catalogID: #menus ) 
							#nameKey: #pageVariables 
							#value: #showInspectorPage ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_BecomeMultiPage 
								#defaultString: '&amp;Become Multi-Page' 
								#catalogID: #menus ) 
							#value: #mutateToWorkbook ) ) #(2 1 ) nil ) ) 
			#(#{UI.MenuItem} 
				#rawLabel: 
				#(#{Kernel.UserMessage} 
					#key: #_Options 
					#defaultString: '&amp;Options' 
					#catalogID: #menus ) 
				#nameKey: #optionsMenu 
				#submenu: #(#{UI.Menu} #(
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_Toolbar 
								#defaultString: '&amp;Toolbar' 
								#catalogID: #menus ) 
							#nameKey: #toolbar 
							#value: #toggleToolbar 
							#indication: true ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_StatusBar 
								#defaultString: '&amp;Status Bar' 
								#catalogID: #menus ) 
							#nameKey: #toggleStatusBar 
							#value: #toggleStatusBar ) ) #(2 ) nil ) ) 
			#(#{UI.MenuItem} 
				#rawLabel: 
				#(#{Kernel.UserMessage} 
					#key: #_Help 
					#defaultString: '&amp;Help' 
					#catalogID: #menus ) 
				#nameKey: #help 
				#submenu: #(#{UI.Menu} #(
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_Workspace 
								#defaultString: '&amp;Workspace' 
								#catalogID: #menus ) 
							#value: #helpWorkspace 
							#shortcutKeyCharacter: #F1 
							#shortcutModifiers: 0 
							#labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #help ) ) 
						#(#{UI.MenuItem} 
							#rawLabel: 
							#(#{Kernel.UserMessage} 
								#key: #_AboutVisualWorksDot 
								#defaultString: '&amp;About VisualWorks...' 
								#catalogID: #menus ) 
							#value: #helpAbout ) ) #(1 1 ) nil ) ) ) #(6 ) nil ) decodeAsLiteralArray</body>
</methods>

<do-it>"Imported Classes:"</do-it>

<do-it>self error: 'Attempting to file-in parcel imports.  Choose terminate or close'</do-it>

<class>
<name>Object</name>
<environment>Core</environment>
<super></super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Kernel-Objects</category>
<attributes>
<package>Kernel-Objects</package>
</attributes>
</class>

<class>
<name>CompiledCode</name>
<environment>Kernel</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>objects</indexed-type>
<inst-vars>bytes </inst-vars>
<class-inst-vars></class-inst-vars>
<imports>
			private Kernel.OpcodePool.*
			</imports>
<category>Kernel-Methods</category>
<attributes>
<package>Kernel-Methods</package>
</attributes>
</class>

</st-source>
