From VisualWorks®, 7.6 of February 1, 2008 on February 1, 2008 at 2:36:10 pm (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.'] <class> <name>Cancel</name> <environment>Core</environment> <super>Core.Error</super> <private>false</private> none <imports></imports> <category>VWInstallerFramework</category> <attributes> <package>VWInstallerExtensions</package> </attributes> </class> <comment> Core.Cancel
Indicates cancel by user or by other circumstance, such as command line options. For example, a '-help' option might produce output and then quit without actually installing anything.
</comment> <class> <name>ZLibBufferError</name> <environment>OS.ZLib</environment> <super>Core.Error</super> <private>false</private> none <imports></imports> <category>VWInstallerExtensions</category> <attributes> <package>VWInstallerExtensions</package> </attributes> </class> <comment> OS.ZLib.ZLibBufferError
Raised during #inflate: to signal a buffer error.
</comment> <class> <name>CursorSensitiveHelpSequenceController</name> <environment>UI</environment> <super>UI.SequenceController</super> <private>false</private> none helpProvider <imports></imports> <category>VWInstallerFramework</category> <attributes> <package>VWInstallerExtensions</package> </attributes> </class> <comment> UI.CursorSensitiveHelpSequenceController
Adds behavior to notify an interested object of mouse movements within the bounds of the list widget. Instance Variables: mouseEventTracker <ComponentSelectorPage> object interested in receiving mouse moved event updates
</comment> <class> <name>AbortPackaging</name> <environment>Core</environment> <super>Core.Error</super> <private>false</private> none <imports></imports> <category>VWInstallerFramework</category> <attributes> <package>VWInstallerExtensions</package> </attributes> </class> <comment> Core.AbortPackaging
Indicates user has cancelled packaging, allowing application to reset certain aspects accordingly.
</comment> <class> <name>FTPReadFailure</name> <environment>Net</environment> <super>Core.Error</super> <private>false</private> none <imports></imports> <category>VWInstallerExtensions</category> <attributes> <package>VWInstallerExtensions</package> </attributes> </class> <comment> Net.FTPReadFailure
Signalled by FTPReadStream to indicate unexpected end of transfer. Outside the normal FTPSignal hierarchy to facilitate restart error handling.
</comment> <class> <name>FTPReadStream</name> <environment>Net</environment> <super>OS.ExternalReadStream</super> <private>false</private> none bytesAnswered expectedSize <imports></imports> <category>VWInstallerExtensions</category> <attributes> <package>VWInstallerExtensions</package> </attributes> </class> <comment> Net.FTPReadStream
FTPReadStream can be initialized to know how many bytes to expect for a file transfer. If a connection drops unexpectedly, an FTPReadFailure is raised allowing clients to restart the transfer from that point via #restoreFromURL:. Instance Variables: bytesAnswered <Integer> number of bytes answered so far, can be passed as the argument to FTPClient>>transferOffset: when restarting a failed transfer from where it left off expectedSize <Integer> total number of bytes expected for the file transfer
</comment> <class> <name>LazyValueHolder</name> <environment>UI</environment> <super>UI.ValueHolder</super> <private>false</private> none <imports></imports> <category>VWInstallerExtensions</category> <attributes> <package>VWInstallerExtensions</package> </attributes> </class> <comment> UI.LazyValueHolder
LazyValueHolder is lazy about updating its value. If the new value is equivalent to the current value, the new value is ignored and no update occurs.
</comment> <methods> UI.CursorSensitiveHelpSequenceController <category>events</category>
cursorIndexForMouseEvent: event ^[view elementIndexFor: (sensor cursorPointFor: event)] on: Error do: [:ex | ex return]
exitEvent: event helpProvider notNil ifTrue: [helpProvider trackMouseExitEvent: event from: self]. ^super exitEvent: event
mouseMovedEvent: event helpProvider notNil ifTrue: [helpProvider trackMouseMovedEvent: event from: self]. ^super mouseMovedEvent: event
</methods> <methods> UI.CursorSensitiveHelpSequenceController <category>keyboard</category>
processKeyboardEvent: aKeyboardEvent super processKeyboardEvent: aKeyboardEvent. (#(#Down #Up #PageDown #PageUp #Home #End) includes: aKeyboardEvent keyValue) ifTrue: [helpProvider trackKeyboardNavigationEvent: aKeyboardEvent]
</methods> <methods> UI.CursorSensitiveHelpSequenceController <category>accessing</category>
helpProvider: anObject helpProvider := anObject
</methods> <methods> Core.AbortPackaging <category>private - actions</category>
defaultAction ^nil
</methods> <methods> Net.FTPReadFailure class <category>testing</category>
mayResume ^true
</methods> <methods> Net.FTPReadStream <category>accessing</category>
bytesAnswered ^bytesAnswered ifNil: [bytesAnswered := 0]
expectedSize ^expectedSize
expectedSize: anInteger expectedSize := anInteger
incrementBytes: anInteger bytesAnswered := self bytesAnswered + anInteger
next: anInteger into: aSequenceableCollection startingAt: startIndex "Store the next anInteger elements of the receiver into aSequenceableCollection starting at startIndex in aSequenceableCollection. Answer aSequenceableCollection." | startIndexMinusOne howManyRead | (lineEndConvention == LineEndCRLF and: [binary not]) ifTrue: [^self crlfNext: anInteger into: aSequenceableCollection startingAt: startIndex]. anInteger < 1 ifTrue: [^aSequenceableCollection]. self atEnd ifTrue: [^Stream incompleteNextCountSignal raiseRequestWith: 0]. "Read the first byte with #next to ensure the receiver is readable." aSequenceableCollection at: startIndex put: self next. startIndexMinusOne := startIndex - 1. howManyRead := 1. [howManyRead < anInteger] whileTrue: [| increment newHowManyRead | self atEnd ifTrue: [(lineEndConvention == LineEndLF and: [binary not]) ifTrue: [aSequenceableCollection replaceAll: LF with: CR from: startIndex to: startIndexMinusOne + howManyRead]. self incrementBytes: howManyRead. ^Stream incompleteNextCountSignal raiseRequestWith: howManyRead]. increment := readLimit - position min: anInteger - howManyRead. newHowManyRead := howManyRead + increment. aSequenceableCollection replaceFrom: startIndex + howManyRead to: startIndexMinusOne + newHowManyRead with: collection startingAt: position + 1. position := position + increment. howManyRead := newHowManyRead]. (lineEndConvention == LineEndLF and: [binary not]) ifTrue: [aSequenceableCollection replaceAll: LF with: CR from: startIndex to: startIndexMinusOne + howManyRead]. self incrementBytes: howManyRead. ^aSequenceableCollection
nextPut: anObject "Put the argument, anObject, at the next position in the receiver. Answer anObject." ^self shouldNotImplement
skipThrough: anObject "Skip forward to the occurrence of anObject. Leaves positioned after anObject. If the object is not found the stream is positioned at the end and nil is returned." | byte | [self atEnd ifTrue: [^nil]. byte := self next. self incrementBytes: 1. byte = anObject ifTrue: [^self]] repeat
</methods> <methods> Net.FTPReadStream <category>private</category>
nextBuffer "Read the next buffer and answer true if there was any data." "Used by endTest and atEnd." "On failure raise a signal to give clients the option of restarting the transfer and resuming execution from the point of the signal." ^[super nextBuffer] on: VisualWorks.RemoteExceptions do: [:ex | FTPReadFailure raiseRequestWith: self position. ex retry]
</methods> <methods> Net.FTPReadStream <category>restart</category>
restoreFromURL: anFtpURL (anFtpURL fileDirectoryDo: [:canonicalUri :client | client transferOffset: self bytesAnswered. client readBinaryStream: canonicalUri tail]) expectedSize: self expectedSize; incrementBytes: self bytesAnswered; become: self
</methods> <methods> UI.LazyValueHolder <category>accessing</category>
value: anObject self value = anObject ifFalse: [super value: anObject]
</methods> <methods> UI.GroupBox <category>private</category>
setLabelString: aString label := self makeTextLabelFor: ([aString expandMacros] on: Error do: [:ex | aString]) asText allBold
</methods> <methods> UI.LabeledButtonView <category>initialize-release</category>
setLabelString: aString "Initialize the label string of the receiver to be aString." self setLabel: (self makeTextLabelFor: ([aString expandMacros] on: Error do: [:ex | aString]) asText)
</methods> <methods> UI.Dialog class <category>error reporting dialogs</category>
report: messageString ^self chooseReport: messageString labels: (Array with: #OK << #labels >> 'OK') values: #(nil) default: nil for: nil
</methods> <methods> OS.IShellInterface <category>accessing</category>
externalAccessFailedWith: errorCode "Raise the signal that indicates something went wrong with an external access -- use the argument as the signal's parameter." | errorName | errorCode isError ifTrue: [errorName := errorCode name. errorName == #'io error' ifTrue: [^errorCode handleErrorFor: self]]. ^self externalAccessFailedSignal raiseRequestWith: errorCode errorString: (errorCode isError ifTrue: [nil == errorCode parameter ifTrue: [errorCode name] ifFalse: [errorCode name , ' ' , errorCode parameter printString]])
</methods> <methods> Core.SequenceableCollection <category>converting</category>
asExpandablePath "Answer a new instance of ExpandablePath whose elements are the elements of the receiver, in the same order." | newExpandablePath | newExpandablePath := #{VisualWorks.ExpandablePath} value new: self size. self do: [:each | newExpandablePath addLast: each]. ^newExpandablePath
</methods> <methods> Kernel.Parcel class <category>private-loading</category>
loadParcelCachedFrom: aStringOrFilename "Load the required parcel, using the info cache to locate the parcel and any prerequisites." "First see if this parcel is already in the process of being loaded." | loadedParcel loadTag | loadedParcel := (QueryNotification newSignal) parameter: (loadTag := #parcel -> aStringOrFilename asString); valueWithDefault: [nil]. loadedParcel notNil ifTrue: [^loadedParcel]. loadedParcel := self new. [loadedParcel startLoad. ["If the parcel is being reloaded loadFrom: will return the old parcel." [loadedParcel := loadedParcel loadFrom: aStringOrFilename] on: QueryNotification do: [:ex | loadTag = ex parameter ifTrue: [ex resume: loadedParcel]. ex pass]. self replaceParcel: loadedParcel] on: self abortedActionSignal do: [:ex | (ex parameter size < 4 or: [(ex parameter at: 4) ~~ #silent]) ifTrue: [Transcript cr; show: ex errorString]. ex parameter first ifNotNil: [ex parameter first unload]. ^nil]. self loadUninstalledCodePostLoadOf: loadedParcel] ensure: [loadedParcel endLoad]. ^loadedParcel
</methods> <methods> Kernel.Parcel <category>private-load/unload</category>
setParcelPropertyFrom: aSource | fname | aSource isURI ifTrue: [^self]. fname := Filename logicalComponents: (aSource asString copyReplaceAll: self class fileExtension with: ''). self propertyAt: #parcel put: fname asArray
</methods> <methods> Core.Stream <category>testing</category>
isForText ^false
</methods> <methods> RuntimePackager.RuntimeBuilderUI class <category>dynamic references</category>
dynamicallyReferencedSelectors "Answer selectors that can be dynamically referenced in the runtime image." ^#(#autoTestApplication)
</methods> <methods> RuntimePackager.RuntimeBuilderUI <category>functions</category>
autoTestApplication | realStartupMethod | realStartupMethod := self options startupMethod. self options startupMethod: #dynamicReferencesTest. self testApplication. (self tester) beginTest; acceptReferences; endTest; accept. self options startupMethod: realStartupMethod
</methods> <methods> RuntimePackager.RuntimeBuilderUI <category>accessing</category>
interactWithUser: aBoolean interactWithUser := aBoolean
keptItems ^keptItems
options ^options
</methods> <methods> RuntimePackager.RuntimeBuilderUI <category>actions</category>
saveParamsTo: file "Save parameters to file" " See if any pending changes are outstanding" | out | options isBeingChanged | keptItems isBeingChanged | memoryParams isBeingChanged ifTrue: [(Dialog confirm: ('Changes are pending in already open windows.\' , 'Saving settings will not include those changes\' , 'unless you first press Ok in the respective windows.\\' , 'Do you want to continue anyway?') withCRs) ifFalse: [^self]]. ([file canBeWritten] on: OSErrorHolder errorSignal do: [:ex | ex return: false]) ifFalse: [Dialog warn: 'Parameter file cannot be written with name supplied'. ^self]. " show work in progress " Cursor write showWhile: [" open the output file " out := [file writeStream] on: OSErrorHolder errorSignal do: [:ex | (Dialog choose: 'Output file cannot be written' labels: #('OK' 'Debug') values: #(#ok #debug) default: #ok) == #ok ifTrue: [^self] ifFalse: [ex reject]]. " Write each parameter class from current contents" [out nextPutAll: '"RuntimeBuilderUI settings '; nextPutAll: Date today printString; space; nextPutAll: Time now printString; nextPut: $"; cr; cr; nextPutAll: 'version '; print: RuntimeManager managerVersion; cr; nextPutAll: 'options ( '. options encodeOn: out tab: 1. out nextPutAll: ' )'; cr; cr; nextPutAll: 'keptAndDeletedItems ('. keptItems encodeOn: out tab: 1. out nextPutAll: ' )'. out cr; cr; nextPutAll: 'memoryParams ('. memoryParams encodeOn: out tab: 1. out nextPutAll: ' )' " close the output file and remember its name "] ensure: [out close]. paramFilename := file " end cursor showWhile "]
</methods> <methods> RuntimePackager.RuntimeBuilderUI <category>accessing</category>
tester ^tester
</methods> <methods> Core.EncodedStream <category>private</category>
basicAtEnd ^stream basicAtEnd
</methods> <methods> Kernel.CodeReaderStream class <category>instance creation</category>
openOnURI: aURI ^self basicNew onReadStream: aURI asURI binaryReadStream
</methods> <methods> Kernel.CodeReaderStream <category>private</category>
onReadStream: anExternalReadStream binary := true. swap := false. isBigEndianPlatform := UninterpretedBytes isBigEndian. ioConnection := anExternalReadStream ioConnection. ioBuffer := anExternalReadStream ioBuffer. collection := ioBuffer buffer. lineEndConvention ifNil: [self lineEndConvention: ioConnection lineEndConvention]. position := ioBuffer firstDataPosition - 1. readLimit := 0. writeLimit := -1. ioConnection canPersist ifTrue: [self setDependency]. collection changeClassTo: BinaryStorageBytes. scratchBuffer := BinaryStorageBytes new: 8
</methods> <methods> Kernel.CodeComponent class <category>signal handlers</category>
handleNoSourceSignal: exception name: componentName Transcript show: (#loadWithoutSourceTemplate << #installer >> '<n>Failed to find source file:<nt><1s><n>Loading without source.' expandMacrosWith: exception parameter). exception resume: true. self noSourceFileSignal raiseWith: (Array with: exception parameter with: componentName) errorString: (#errParcelFromFile << #dialogs >> ' : <1s> from file : <2s>' expandMacrosWith: exception parameter with: componentName)
</methods> <methods> UI.MultiSelectionInList <category>utility</category>
setList: newList selecting: aCollectionOrNil "Replace the list of the receiver with newList and make aCollectionOrNil its new selection set. Scroll the list widget so that the first visible selection matching any in aCollectionOrNil during this transition appears stationary. If there is no matching selection in aCollectionOrNil then scroll to make the aCollectionOrNil's first selection visible in its place. Finally, if newList has fewer items scroll the list widget back as needed so that at least one list item (e.g. the last) remains visible" | newSelectionIndexes index oldSelectionPairs | oldSelectionPairs := Dictionary new. self selectionIndexes do: [:each | oldSelectionPairs at: (self list at: each) put: each]. listHolder setValue: newList. newSelectionIndexes := self newSelections. aCollectionOrNil ifNotNil: [aCollectionOrNil do: [:each | (index := newList indexOf: each ifAbsent: []) isNil ifFalse: [newSelectionIndexes add: index]]]. listHolder changed: #value with: (Array with: newSelectionIndexes with: oldSelectionPairs)
</methods> <methods> UI.Win95PassiveLabel <category>private</category>
setLabelString: aString aString ifNil: [label := nil. ^self]. label := self makeTextLabelFor: ([aString expandMacros] on: Error do: [:ex | aString]) asText
</methods> <methods> Core.PrintPolicy <category>printing</category>
printShort: anObject | stream | stream := String new writeStream. self printShort: anObject on: stream. ^stream contents
</methods> <methods> Core.Integer <category>printing</category>
printAsDiskSpace ^#diskSpaceSignature << #installer >> '<1p>Mb' expandMacrosWith: (self / 1048576 roundTo: 0.1)
</methods> <methods> OS.PCFilename <category>utilities</category>
setProtection: mode "On Windows, there is a notion of unix style permissions. However, at this point we do not provide an interface to the the APIs to set those permissions. For now, simply set the writability of a file. See the UNIX man page on chmod for information on UNIX style file permissions." |writable| writable := (mode bitAnd: 8r222) ~= 0. (self definitelyExists and: [self isDirectory not]) ifTrue: "Because we are only using this method for the installer, for now, we're trying to be safe and not raise any new errors in case this does not work." [[self setWritable: writable] on: Error do: [:ex | nil]]
</methods> <methods> OS.LogicalFilename <category>testing</category>
isURI ^false
</methods> <methods> Net.FtpURL <category>initialize</category>
ensureInstallerLogin (self user isNil or: [self user isEmpty]) ifTrue: [self user: 'anonymous'; password: 'VWInstaller'. ^self]. (self user ~= 'anonymous' and: [self password isNil or: [self password isEmpty]]) ifFalse: [^self]. self password: (Dialog request: (#enterPasswordPrompt << #installer >> 'Enter the password for <1s>:' expandMacrosWith: self user))
</methods> <methods> Net.FtpURL <category>accessing</category>
password: aString password := aString
</methods> <methods> Net.FtpURL <category>stream -- guarded</category>
textReadStreamDo: aBlock ^self fileDirectoryDoAndClose: [:canonicalUri :client | client readTextStream: canonicalUri tail do: [:data | aBlock value: data value: ((Dictionary new) at: #MIME put: canonicalUri guessMimeType; yourself)]]
</methods> <methods> Net.FtpURL <category>accessing</category>
user: aString user := aString
</methods> <methods> UI.PassiveLabel <category>private</category>
setLabelString: aString aString ifNil: [label := nil. ^self]. label := self makeTextLabelFor: ([aString expandMacros] on: Error do: [:ex | aString]) asText allBold
</methods> <methods> Core.String <category>converting</category>
asRemoteOrLocalFile | uri | ^[uri := self asURI. ((uri isKindOf: Net.UnknownURLType) or: [uri isPartial]) ifTrue: [self asFilename] ifFalse: [uri]] on: Error do: [:ex | [self asFilename] on: Error do: [:ex2 | nil]]
</methods> <methods> OS.IOBuffer <category>accessing</category>
input ^input
input: anObject input := anObject
output ^output
output: anObject output := anObject
</methods> <methods> Kernel.ObjectMemory class <category>accessing</category>
imageSignature ^self versionId copyFrom: 5 to: 8
platformByte ^self versionId at: 2
</methods> <methods> OS.OsInvalidArgumentsError <category>dialogs</category>
warnForWindow: aWindowOrNil Dialog warn: (#warnInvalidFilenameDialog << #installer >> 'The following file is invalid:<nt><1s><n>Please specify a valid filename.' expandMacrosWith: self parameter asString). ^nil
</methods> <methods> Core.StringParameterSubstitution class <category>class initialization</category>
initialize "StringParameterSubstitution initialize" Default := self new. Default setDefaultEmphasis: nil. Default map: $p using: [:mt :index | mt printFor: index]. Default map: $s using: [:mt :index | mt nextPutStringFor: index]. Default map: $? using: [:mt :index | mt showBooleanFor: index]. Default map: $# using: [:mt :index | mt showMultipleFor: index]. Default map: $n using: [:mt :dummy | mt output cr]. Default map: $t using: [:mt :dummy | mt output tab]. Default map: $x using: [:mt :index | mt nextPutTextFor: index]. Default map: $b using: [:mt :dummy | mt addEmphasis: #bold]. Default map: $l using: [:mt :dummy | mt addEmphasis: #large]. Default map: $m using: [:mt :dummy | mt addEmphasis: #small]. Default map: $e using: [:mt :dummy | mt setDefaultEmphasis: nil]
</methods> <methods> Core.StringParameterSubstitution <category>accessing</category>
addEmphasis: aSymbolOrCollection | newEmphasis | self ensureTextOutput. (defaultEmphasis isNil or: [defaultEmphasis isEmpty]) ifTrue: [^self setDefaultEmphasis: aSymbolOrCollection]. newEmphasis := OrderedCollection new. defaultEmphasis isSymbol ifTrue: [newEmphasis add: defaultEmphasis] ifFalse: [newEmphasis addAll: defaultEmphasis]. aSymbolOrCollection isSymbol ifTrue: [newEmphasis add: aSymbolOrCollection] ifFalse: [newEmphasis addAll: aSymbolOrCollection]. self setDefaultEmphasis: newEmphasis asArray
</methods> <methods> Core.StringParameterSubstitution <category>transforming</category>
ensureTextOutput output isForText ifFalse: [output := (TextStream on: String new) nextPutAll: output contents; yourself]
nextPutTextFor: argIndex self ensureTextOutput. output nextPutAllText: (args at: argIndex)
</methods> <methods> OS.WinNTSystemSupport <category>util</category>
installFileAssociation: aFileAssociation aFileAssociation installForWinNT: self
</methods> <methods> OS.URI <category>testing</category>
isURI ^true
</methods> <methods> OS.Filename class <category>utilities</category>
isTextExtension: aString ^#('.htm' '.html' '.inc' '.ini' '.ssp' '.st' '.tld' '.txt') includes: aString
</methods> <methods> OS.Filename <category>stream creation</category>
binaryReadStream "Answer a read stream connected to the file represented by the receiver." ^(self withEncoding: #binary) readStream
</methods> <methods> OS.Filename <category>file utilities</category>
copyToDirectory: aDirectory ^self copyTo: (aDirectory construct: self tail)
createDirectory ^self createDirectoryNotifying: nil
createDirectoryNotifying: anObject "Create the directory represented by the receiver and answer true on success. On failure, attempt to create containing directory path and retry." | retried | retried := false. ^ [self makeDirectory. anObject update: #directoryCreated with: self. true] on: OSErrorHolder nonexistentSignal do: [:ex | retried ifTrue: [ex return: false]. self ensureDirectoryNotifying: anObject. retried := true. ex retry]
deleteAllExcept: aCollection "The receiver is a directory. Delete all the receiver's contents except those included in aCollection." (aCollection first isAbsolute ifTrue: [self filenamesMatching: '*'] ifFalse: [self directoryContents]) do: [:fn | (aCollection includes: fn asFilename) ifFalse: [fn asFilename deleteTreeForced]]
deleteTree self isDirectory ifTrue: [(self filenamesMatching: '*') do: [:fn | fn deleteTree]]. self delete
deleteTreeForced self isDirectory ifTrue: [(self filenamesMatching: '*') do: [:fn | fn deleteTreeForced]]. self makeWritable; delete
ensureDirectory ^self ensureDirectoryNotifying: nil
ensureDirectoryNotifying: anObject | parent | parent := self directory. "Avoid looping on non-existent root directories, such as absent removable media." (parent = self or: [parent exists]) ifTrue: [^self]. parent ensureDirectoryNotifying: anObject; makeDirectory. anObject update: #directoryCreated with: parent
</methods> <methods> OS.Filename <category>testing</category>
hasTextExtension ^self class isTextExtension: self extension
isSymlink ^false
isURI ^false
</methods> <methods> OS.Filename <category>comparing</category>
matchesSize: anIntegerOrNil andTimestamp: aTimestampOrNil ^anIntegerOrNil notNil and: [aTimestampOrNil notNil and: [anIntegerOrNil = self fileSize and: [aTimestampOrNil = self modificationTimestamp]]]
</methods> <methods> OS.Filename <category>parsing</category>
prefix "Answer the tail of the receiver without the extension." ^self tail copyFrom: 1 to: self tail size - (self extension ifNil: [0] ifNotNil: [:extensionString | extensionString size])
</methods> <methods> OS.Filename <category>stream creation - guarded</category>
readStreamDo: aBlock | readStream | readStream := self readStream. ^[aBlock cull: readStream cull: nil] ensure: [readStream close]
</methods> <methods> OS.Filename <category>utilities</category>
setProtection: mode "By default do nothing, since all platforms do not have a UNIX style of permission bits."
</methods> <methods> OS.Filename <category>stream creation - guarded</category>
writeStreamDo: aBlock | writeStream | writeStream := self writeStream. ^[aBlock cull: writeStream cull: nil] ensure: [writeStream close]
</methods> <methods> Kernel.CodeReader <category>private</category>
createStreamFrom: aSource #{Store.ParcelRecord} ifDefinedDo: [:parcelRecord | (aSource isKindOf: parcelRecord) ifTrue: [^self createStreamFromRecord: aSource]]. aSource isURI ifTrue: [^self createStreamFromURI: aSource]. self createStreamFromFileNamed: aSource
createStreamFromURI: aURI stream := CodeReaderStream openOnURI: aURI. streamDir := aURI directory
</methods> <methods> Core.TextStream <category>testing</category>
isForText ^true
</methods> <methods> Core.Collection <category>adding</category>
addAllIfAbsent: aCollection aCollection do: [:each | self addIfAbsent: each]
addFirst: anObject ^self shouldNotImplement
addFirstIfAbsent: anObject ^(self includes: anObject) ifTrue: [nil] ifFalse: [self addFirst: anObject]
addIfAbsent: anObject "Add anObject only if not already present. Answer anObject if added, or its equivalent if already present." ^self detect: [:each | each = anObject] ifNone: [self add: anObject]
</methods> <methods> Core.Collection <category>testing</category>
noneSatisfy: aBlock ^(self anySatisfy: aBlock) not
</methods> <methods> OS.ExternalConnection <category>accessing</category>
streamClass ^inputDescriptor ifNil: [ExternalReadStream] ifNotNil: [:descr | descr class = Net.FTPSocketAccessor ifTrue: [Net.FTPReadStream] ifFalse: [ExternalReadStream]]
</methods> <methods> OS.ExternalEncodedStreamConstructor <category>streams</category>
readStream "Answer a read stream connected to the file represented by the receiver." ^self addEncodingTo: (dataRepository streamClass on: dataRepository)
</methods> <methods> OS.Win95SystemSupport <category>constants</category>
ERROR_NO_MORE_ITEMS "Not an error, but indicates that the last key has been enumerated (and retrieved), so there are no more." ^259
</methods> <methods> OS.Win95SystemSupport <category>accessing</category>
getSubkeysOfPath: path ifAbsent: errorBlock "Answer all subkeys of path under defaultRoot, or the value of errorBlock if path is not present in the registry." ^self getSubkeysOfRoot: self defaultRoot path: path ifAbsent: errorBlock
getSubkeysOfRoot: rootValue path: path ifAbsent: errorBlock "Answer all subkeys of path under rootValue, or the value of errorBlock if path is not present in the registry." | buffer bufferSize count key lastWriteTime keyCollection index returnCode subkey | buffer := CIntegerType unsignedChar gcMalloc: (bufferSize := self MAX_KEY_LENGTH * 2). count := CIntegerType long gcMalloc. (key := CVoidType void pointerType gcMalloc) contents: (CVoidType void pointerType cast: rootValue). lastWriteTime := CIntegerType unsignedLong gcMalloc. keyCollection := OrderedCollection new. index := -1. (returnCode := self RegOpenKeyEx: key contents subKey: (self registryPathStringFrom: path) options: 0 access: self KEY_READ result: key) = self ERROR_SUCCESS ifFalse: [^errorBlock value]. [[returnCode = self ERROR_SUCCESS] whileTrue: [count contents: bufferSize. returnCode := self RegEnumKeyEx: key contents index: (index := index + 1) name: buffer nameLen: count reserved: nil class: nil classLen: nil lastWriteTime: lastWriteTime. subkey := buffer copyCStringFromHeap. (keyCollection includes: subkey) ifFalse: [keyCollection add: subkey]]] ensure: [self RegCloseKey: key contents]. buffer free. count free. key free. lastWriteTime free. returnCode = self ERROR_NO_MORE_ITEMS ifFalse: [^errorBlock value]. ^keyCollection
</methods> <methods> OS.Win95SystemSupport <category>utilities</category>
installFileAssociation: aFileAssociation aFileAssociation installForWin95: self
</methods> <methods> OS.Win95SystemSupport <category>constants</category>
MAX_KEY_LENGTH ^255
</methods> <methods> OS.Win95SystemSupport <category>utilities</category>
registryPathStringFrom: componentStrings | stream | stream := String new writeStream. componentStrings do: [:key | stream nextPutAll: key] separatedBy: [stream nextPut: $\]. ^stream contents
</methods> <methods> OS.Win95SystemSupport <category>constants</category>
REG_BINARY ^3
REG_DWORD ^4
REG_NONE ^0
</methods> <methods> OS.Win95SystemSupport <category>accessing</category>
removeKeyAtRoot: rootValue path: path name: keyName ifAbsent: errorBlock "Remove the key named keyName at rootValue and path. If not present in registry, return value of errorBlock." | key errorCode voidPointerType | key := (voidPointerType := CVoidType void pointerType) gcMalloc. key contents: (voidPointerType cast: rootValue). errorCode := self RegOpenKeyEx: key contents subKey: (self registryPathStringFrom: path) options: 0 access: self KEY_SET_VALUE result: key. errorCode = self ERROR_SUCCESS ifFalse: [^errorBlock value]. errorCode := [self RegDeleteKeyA: key contents name: keyName] ensure: [self RegCloseKey: key contents]. key free. errorCode = self ERROR_SUCCESS ifFalse: [^errorBlock value]
setVariableWithRoot: rootValue path: path key: subkey value: value "Set the value in the registry of subkey, treating value as a string. Answer whether the operation was successful." ^self setVariableWithRoot: rootValue path: path key: subkey value: value type: self REG_SZ
setVariableWithRoot: rootValue path: path key: subkey value: value type: type "Set the value in the registry of subkey. Answer whether the operation was successful." | key newKey errorCode voidPointerType | key := (voidPointerType := CVoidType void pointerType) gcMalloc. key contents: (voidPointerType cast: rootValue). newKey := self createPath: path in: key contents. newKey ifNil: [^false]. errorCode := self RegSetValueEx: newKey contents asInteger name: subkey reserved: 0 type: type data: value size: value size. key free. ^errorCode = self ERROR_SUCCESS
</methods> <methods> OS.ExternalReadStream <category>accessing</category>
ioBuffer ^ioBuffer
</methods> <methods> UI.Win95GroupBox <category>private</category>
setLabelString: aString label := self makeTextLabelFor: ([aString expandMacros] on: Error do: [:ex | aString]) asText
</methods> <methods> Core.SharedQueue <category>copying</category>
copyContents ^[accessProtect critical: [contents copy]] valueUninterruptably
</methods> <methods> OS.ZLib.ZLibInterface <category>inflating</category>
inflate: flushCode | errString | errno := self cInflate: self zstream flush: flushCode. (errno == self Z_OK or: [errno == self Z_STREAM_END]) ifTrue: [^errno]. errString := self errorStringFor: errno. errString = 'buffer error' ifTrue: [ZLibBufferError raiseErrorString: errString] ifFalse: [self error: errString]
</methods> <methods> OS.UnixFilename <category>testing</category>
isSymlink ^self runningLinux ifTrue: [LinuxSymlinkSupport new isSymlink: self asString] ifFalse: [(UnixProcess shOne: ('ls -Al "<1s>"' expandMacrosWith: self asString)) first = $l]
</methods> <methods> OS.UnixFilename <category>file utilities</category>
moveTo: aFilename UnixProcess shOne: ('mv "<1s>" "<2s>"' expandMacrosWith: self asString with: aFilename asString)
</methods> <methods> OS.UnixFilename <category>testing</category>
runningLinux ^#(40 42 43 44 45 64) includes: (ObjectMemory versionId at: 2)
</methods> <methods> Kernel.BlockClosure <category>evaluating</category>
warnFileErrorsUsing: aWindowOrNil ^self on: OsInvalidArgumentsError do: [:ex | ex return: (ex warnForWindow: aWindowOrNil)]
</methods> <methods> RuntimePackager.RuntimeErrorNotifier <category>private</category>
ensureDumpFilenameIsWritable: aFilenameOrNil "Return aFilenameOrNil if it is writable. If aFilenameOrNil is nil, it represents the user's attempt to cancel, so return nil. If the parent directory does not exist, try to create it first. If that fails prompt for a new location." ^(aFilenameOrNil isNil or: [aFilenameOrNil ensureDirectory; canBeWritten]) ifTrue: [aFilenameOrNil] ifFalse: [self requestValidFilenameIfHeadful: #unwritableErrorLog << #dialogs >> 'Unwritable file. Please specify a writable file for the error log:' default: aFilenameOrNil asString]
</methods> <methods> Core.SystemEventInterest class <category>dependencies-pragma</category>
checkMacStartupCommands <triggerAtSystemEvent: #returnFromSnapshot> #{VisualWorks.CheckServerPage} value checkMacStartupCommands
</methods> <methods> Core.ImageConfigurationSystem <category>command line handling</category>
amendMap: tokenReadStream <option: '-amendMap:'> [#{VisualWorks.InstallMapAdjustor} value amend: tokenReadStream next. ObjectMemory quit] forkAt: Processor userSchedulingPriority + 1
stripInstallImage: tokenReadStream "Fork the action in case image startup hasn't completed yet, then evaluate it in a UI process." <option: '-stripInstallImage' > [ [| nextToken | nextToken := nil. #{VisualWorks.InstallImageStripper} value stripInstallImage: ((tokenReadStream atEnd or: [(nextToken := tokenReadStream next) first = $-]) ifTrue: [nil] ifFalse: [nextToken])] uiEventNow] forkAt: Processor userBackgroundPriority - 1
updateImage: tokenReadStream <option: '-ReplaceProgram'> [#{VisualWorks.CheckServerPage} value replaceProgramWith: tokenReadStream next] forkAt: Processor userSchedulingPriority - 1
</methods> <methods> OS.Win95SystemSupport <category>procedures</category>
RegDeleteKeyA: hKey name: lpszValueName <C: long RegDeleteKeyA(void * hKey, char *lpszValueName)> ^self externalAccessFailedWith: _errorCode
RegEnumKeyEx: hKey index: dwIndex name: lpName nameLen: lpcName reserved: lpReserved class: lpClass classLen: lpcClass lastWriteTime: lpftLastWriteTime <C: long RegEnumKeyExA( void* hKey, unsigned long dwIndex, char* lpName, long* lpcName, long* lpReserved, char* lpClass, long* lpcClass, long* lpftLastWriteTime)> ^self externalAccessFailedWith: _errorCode
</methods> <initialize> Core.StringParameterSubstitution </initialize> "Imported Classes:" self error: 'Attempting to file-in parcel imports. Choose terminate or close' <class> <name>URI</name> <environment>OS</environment> <super>Core.Object</super> <private>false</private> none <imports></imports> <category>Net-Resources</category> <attributes> <package>URISupport</package> </attributes> </class> <class> <name>Parcel</name> <environment>Kernel</environment> <super>Kernel.CodeComponent</super> <private>false</private> none definedObjects definedClasses definedBindings classSelectors namedObjects dirty loaded parcels classParcelMap parcelFileInfoCache parcelFileDirectoryCache dependents <imports></imports> <category>System-Code Components</category> <attributes> <package>System-Code Components</package> </attributes> </class> <class> <name>Win95SystemSupport</name> <environment>OS</environment> <super>OS.Win32SystemSupport</super> <private>false</private> none <imports> OS.Win95SystemSupportDictionary.* </imports> <category>OS-PC</category> <attributes> <includeFiles></includeFiles> <includeDirectories></includeDirectories> <libraryFiles><item>advapi32.dll</item> <item>user32.dll</item> <item>gdi32.dll</item> <item>KERNEL32.DLL</item></libraryFiles> <libraryDirectories></libraryDirectories> false full <package>OS-PC</package> </attributes> </class> <class> <name>IShellInterface</name> <environment>OS</environment> <super>External.ExternalInterface</super> <private>false</private> none <imports> private OS.IShellInterfaceDictionary.* </imports> <category>Windows Shortcuts</category> <attributes> <includeFiles></includeFiles> <includeDirectories></includeDirectories> <libraryFiles><item>ole32.dll</item> <item>oleaut32.dll</item> <item>linkmaster.dll</item></libraryFiles> <libraryDirectories></libraryDirectories> false full <package>Windows-Shortcuts</package> </attributes> </class> <class> <name>MultiSelectionInList</name> <environment>UI</environment> <super>UI.SelectionInList</super> <private>false</private> none <imports></imports> <category>UIBasics-Collections</category> <attributes> <package>UIBasics-Collections</package> </attributes> </class> <class> <name>ZLibInterface</name> <environment>OS.ZLib</environment> <super>External.ExternalInterface</super> <private>false</private> none zstream errno heap <imports> private OS.ZLib.ZLibInterfaceDictionary.* </imports> <category>Compression-ZLib</category> <attributes> <includeFiles><item>zlib.h</item></includeFiles> <includeDirectories><item>/usr/include</item></includeDirectories> <libraryFiles></libraryFiles> <libraryDirectories></libraryDirectories> false full <package>Compression-ZLib</package> </attributes> </class> <class> <name>StringParameterSubstitution</name> <environment>Core</environment> <super>Core.Object</super> <private>false</private> none argumentTypeMapping input output defaultEmphasis args argEmphases <imports></imports> <category>Collections-Text</category> <attributes> <package>Collections-Text</package> </attributes> </class> <class> <name>Integer</name> <environment>Core</environment> <super>Core.Number</super> <private>false</private> none <imports></imports> <category>Magnitude-Numbers</category> <attributes> <package>Magnitude-Numbers</package> </attributes> </class> <class> <name>LogicalFilename</name> <environment>OS</environment> <super>Core.Object</super> <private>false</private> none components <imports></imports> <category>OS-Support</category> <attributes> <package>OS-Support</package> </attributes> </class> <class> <name>Stream</name> <environment>Core</environment> <super>Core.Object</super> <private>false</private> none <imports> private IOConstants.* </imports> <category>Collections-Streams</category> <attributes> <package>Collections-Streams</package> </attributes> </class> <class> <name>ExternalReadStream</name> <environment>OS</environment> <super>OS.BufferedExternalStream</super> <private>false</private> none <imports> private OS.IOConstants.* </imports> <category>OS-Streaming</category> <attributes> <package>OS-Streaming</package> </attributes> </class> <class> <name>CodeReaderStream</name> <environment>Kernel</environment> <super>OS.ExternalReadStream</super> <private>false</private> none swap isBigEndianPlatform scratchBuffer format <imports> private OS.IOConstants.* </imports> <category>System-Code Storage</category> <attributes> <package>System-Code Storage</package> </attributes> </class> <class> <name>RuntimeBuilderUI</name> <environment>RuntimePackager</environment> <super>UI.ApplicationModel</super> <private>false</private> none stepTitle stepDescription currentStepNumber options keptItems tester paramFilename memoryParams reviewDone itemsDone scanDone testDone memoryDone optionsDone cleanupDone saveParcelsDone interactWithUser <imports></imports> <category>RuntimePackager</category> <attributes> <package>RuntimePackager</package> </attributes> </class> <class> <name>PassiveLabel</name> <environment>UI</environment> <super>UI.SimpleComponent</super> <private>false</private> none label textStyle margin mnemonic controller <imports></imports> <category>UIBasics-Components</category> <attributes> <package>UIBasics-Components</package> </attributes> </class> <class> <name>Win95PassiveLabel</name> <environment>UI</environment> <super>UI.PassiveLabel</super> <private>false</private> none <imports></imports> <category>UILooks-MSWin</category> <attributes> <package>UILooks-MSWin</package> </attributes> </class> <class> <name>ExternalEncodedStreamConstructor</name> <environment>OS</environment> <super>Core.EncodedStreamConstructor</super> <private>false</private> none <imports></imports> <category>OS-Support</category> <attributes> <package>OS-Support</package> </attributes> </class> <class> <name>GroupBox</name> <environment>UI</environment> <super>UI.SimpleComponent</super> <private>false</private> none label border textStyle mnemonic controller <imports></imports> <category>UIBasics-Components</category> <attributes> <package>UIBasics-Components</package> </attributes> </class> <class> <name>Collection</name> <environment>Core</environment> <super>Core.Object</super> <private>false</private> none <imports></imports> <category>Collections-Abstract</category> <attributes> <package>Collections-Abstract</package> </attributes> </class> <class> <name>SequenceableCollection</name> <environment>Core</environment> <super>Core.Collection</super> <private>false</private> none <imports></imports> <category>Collections-Abstract</category> <attributes> <package>Collections-Abstract</package> </attributes> </class> <class> <name>String</name> <environment>Core</environment> <super>Core.CharacterArray</super> <private>false</private> none <imports></imports> <category>Collections-Text</category> <attributes> <package>Collections-Text</package> </attributes> </class> <class> <name>ExternalConnection</name> <environment>OS</environment> <super>Core.Object</super> <private>false</private> none inputDescriptor outputDescriptor <imports></imports> <category>OS-Streaming</category> <attributes> <package>OS-Streaming</package> </attributes> </class> <class> <name>Filename</name> <environment>OS</environment> <super>Core.Object</super> <private>false</private> none osName publicName logicalName <imports></imports> <category>OS-Support</category> <attributes> <package>OS-Support</package> </attributes> </class> <class> <name>UnixFilename</name> <environment>OS</environment> <super>OS.Filename</super> <private>false</private> none <imports></imports> <category>OS-Unix</category> <attributes> <package>OS-Unix</package> </attributes> </class> <class> <name>BlockClosure</name> <environment>Kernel</environment> <super>Core.Object</super> <private>false</private> none method outerContext copiedValues <imports></imports> <category>Kernel-Methods</category> <attributes> <package>Kernel-Methods</package> </attributes> </class> <class> <name>Error</name> <environment>Core</environment> <super>Core.Exception</super> <private>false</private> none <imports></imports> <category>Kernel-Exception Handling</category> <attributes> <package>Kernel-Exception Handling</package> </attributes> </class> <class> <name>OsInvalidArgumentsError</name> <environment>OS</environment> <super>OS.OsError</super> <private>false</private> none <imports></imports> <category>OS-Support</category> <attributes> <package>OS-Support</package> </attributes> </class> <class> <name>CodeReader</name> <environment>Kernel</environment> <super>Core.Object</super> <private>false</private> none stream pointer format parcelName versionString dateString timeString numNamedObjects numClasses numExtensionMethods definedObjects definedBindings definedExternals classes classSelectors categories packageEnvironment packageUndeclared extensionMethods objectSpaceSize objectSpace symbolNum twoByteSymbolNum stringNum twoByteStringNum byteArrayNum floatNum doubleNum fixedNum largePositiveNum largeNegativeNum mclassNum mclassclassNum refNamObjNum scopeZonesNum defObjOrganizerNum classOrganizerNum arbClassNum arbObjectNum messageSendIndices properties userStringsNum namedObjects namedObjectsNum postLoadObjects streamDir sourceFile hideSource importMaps overriddenExtensions versionSelectionBlock warningSuppressionBlock preReadBlock currentSuperclass mustRecompile lateOperations updates tempSourceFile <imports> Behavior.* </imports> <category>System-Code Storage</category> <attributes> <package>System-Code Storage</package> </attributes> </class> <class> <name>TextStream</name> <environment>Core</environment> <super>Core.WriteStream</super> <private>false</private> none lengths emphases currentEmphasis runStartPosition <imports></imports> <category>Collections-Streams</category> <attributes> <package>Collections-Streams</package> </attributes> </class> <class> <name>SequenceController</name> <environment>UI</environment> <super>UI.ControllerWithMenu</super> <private>false</private> none keyboardProcessor outside searchString keyboardHook doStringSearching dispatcher dragDropCallbacks selectOnDownWithDrag autoSelect <imports> private Graphics.TextConstants.* </imports> <category>UIBasics-Controllers</category> <attributes> <package>UIBasics-Controllers</package> </attributes> </class> <class> <name>Win95GroupBox</name> <environment>UI</environment> <super>UI.GroupBox</super> <private>false</private> none <imports></imports> <category>UILooks-MSWin</category> <attributes> <package>UILooks-MSWin</package> </attributes> </class> <class> <name>EncodedStream</name> <environment>Core</environment> <super>Core.PeekableStream</super> <private>false</private> none binary stream encoder policy lineEndConvention lineEndCharacter skipSize <imports> private OS.IOConstants.* </imports> <category>Collections-Streams</category> <attributes> <package>Collections-Streams</package> </attributes> </class> <class> <name>RuntimeErrorNotifier</name> <environment>RuntimePackager</environment> <super>Core.ErrorNotifier</super> <private>false</private> none isProceedable exceptionType debugNotifierMode <imports></imports> <category>RuntimePackager</category> <attributes> <package>RuntimePackager</package> </attributes> </class> <class> <name>IOBuffer</name> <environment>OS</environment> <super>Core.Object</super> <private>false</private> none input output buffer bufferAmount <imports></imports> <category>OS-Streaming</category> <attributes> <package>OS-Streaming</package> </attributes> </class> <class> <name>SharedQueue</name> <environment>Core</environment> <super>Core.Object</super> <private>false</private> none contents accessProtect readSynch <imports></imports> <category>Kernel-Processes</category> <attributes> <package>Kernel-Processes</package> </attributes> </class> <class> <name>WinNTSystemSupport</name> <environment>OS</environment> <super>OS.Win95SystemSupport</super> <private>false</private> none <imports> OS.WinNTSystemSupportDictionary.* </imports> <category>OS-PC</category> <attributes> <includeFiles></includeFiles> <includeDirectories></includeDirectories> <libraryFiles></libraryFiles> <libraryDirectories></libraryDirectories> false full <package>OS-PC</package> </attributes> </class> <class> <name>PrintPolicy</name> <environment>Core</environment> <super>Core.Object</super> <private>false</private> none localeID <imports></imports> <category>Internationalization</category> <attributes> <package>Internationalization</package> </attributes> </class> <class> <name>PCFilename</name> <environment>OS</environment> <super>OS.Filename</super> <private>false</private> none <imports></imports> <category>OS-PC</category> <attributes> <package>OS-PC</package> </attributes> </class> <class> <name>ValueHolder</name> <environment>UI</environment> <super>UI.ValueModel</super> <private>false</private> none value <imports></imports> <category>Interface-Support</category> <attributes> <package>Interface-Support</package> </attributes> </class> <class> <name>FtpURL</name> <environment>Net</environment> <super>OS.URLwithAuthority</super> <private>false</private> none passiveMode user password userAddress <imports></imports> <category>Net-Resources</category> <attributes> <package>FTP</package> </attributes> </class> <class> <name>ImageConfigurationSystem</name> <environment>Core</environment> <super>Core.Subsystem</super> <private>false</private> none allowParcelLoading allowFilein allowSettings allowExpressions useDefaultConfigFile allowDevelopment <imports></imports> <category>System-Subsystems</category> <attributes> <package>System-Subsystems</package> </attributes> </class> <class> <name>LabeledButtonView</name> <environment>UI</environment> <super>UI.BasicButtonView</super> <private>false</private> none label textStyle helpText <imports></imports> <category>UIBasics-Components</category> <attributes> <package>UIBasics-Components</package> </attributes> </class>