From VisualWorks®, 7.6 of February 1, 2008 on February 1, 2008 at 12:48:22 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>Subcanvas1Example</name> <environment>Examples</environment> <super>Examples.List2Example</super> <private>false</private> none <imports></imports> <category>Examples-Help</category> <attributes> <package>Subcanvas1-Example</package> </attributes> </class> <comment> Examples.Subcanvas1Example
Subcanvas2Example demonstrates the use of a subcanvas to inherit and selectively override an interface defined in a superclass.
</comment> <methods> Examples.Subcanvas1Example <category>actions</category>
add "Override the inherited implementation of this method, refining the prompt in the dialog." | entry newList | "Prompt for the name to add." entry := Dialog request: 'Add cursor name'. "If the entry is blank, exit." entry isEmpty ifTrue: [^nil]. "Update the list." newList := SortedCollection withAll: self selectionInList list. newList add: entry. self selectionInList list: newList.
</methods> <methods> Examples.Subcanvas1Example <category>initialize-release</category>
initialize "Install a different list (cursor names) than the inherited default (color names)." | cursorNames | super initialize. cursorNames := Cursor class organization listAtCategoryNamed: #constants. self selectionInList list: cursorNames.
</methods> <methods> Examples.Subcanvas1Example class <category>interface specs</category>
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#{UI.FullSpec} #window: #(#{UI.WindowSpec} #label: 'Subcanvas1Example' #min: #(#{Core.Point} 50 50 ) #bounds: #(#{Graphics.Rectangle} 800 600 991 917 ) ) #component: #(#{UI.SpecCollection} #collection: #( #(#{UI.SubCanvasSpec} #layout: #(#{Graphics.LayoutFrame} 20 0 100 0 -20 1 0 1 ) #flags: 0 #majorKey: #{Examples.List2Example} #minorKey: #listSpec ) #(#{UI.LabelSpec} #layout: #(#{UI.AlignmentOrigin} 0 0.5 10 0 0.5 0 ) #label: 'Selective Reuse' ) #(#{UI.LabelSpec} #layout: #(#{UI.AlignmentOrigin} 0 0.5 36 0 0.5 0 ) #label: 'Local application inherits' #style: #small ) #(#{UI.LabelSpec} #layout: #(#{UI.AlignmentOrigin} 0 0.5 50 0 0.5 0 ) #label: 'everything, then overrides' #style: #small ) #(#{UI.DividerSpec} #layout: #(#{Graphics.LayoutFrame} -50 0.5 33 0 50 0.5 37 0 ) ) #(#{UI.LabelSpec} #layout: #(#{UI.AlignmentOrigin} 0 0.5 64 0 0.5 0 ) #label: 'list or actions as needed' #style: #small ) ) ) )
</methods> "Imported Classes:" self error: 'Attempting to file-in parcel imports. Choose terminate or close' <class> <name>List2Example</name> <environment>Examples</environment> <super>UI.ApplicationModel</super> <private>false</private> none selectionInList <imports></imports> <category>Examples-Help</category> <attributes> <package>List2-Example</package> </attributes> </class>