From VisualWorks®, 7.6 of February 1, 2008 on February 1, 2008 at 12:46:54 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>Dataset2Example</name> <environment>Examples</environment> <super>UI.ApplicationModel</super> <private>false</private> none dsvList selectedRow <imports></imports> <category>Examples-Help</category> <attributes> <package>Dataset2-Example</package> </attributes> </class> <comment> Examples.Dataset2Example
Dataset2Example demonstrates the use of a Dataset widget, expanding on Dataset1Example by adding the ability to add rows. Instance Variables: dsvList - List of rows selectedRow - Employee instance of the selected row
</comment> <methods> Examples.Dataset2Example <category>actions</category>
addRow (dsvList list) add: Employee new
</methods> <methods> Examples.Dataset2Example <category>aspects</category>
dsvList "This method was generated by UIDefiner. Any edits made here may be lost whenever methods are automatically defined. The initialization provided below may have been preempted by an initialize method." ^dsvList isNil ifTrue: [dsvList := SelectionInList new. dsvList selectionIndexHolder compute: [:v | self selectedRow value: dsvList selection]. dsvList] ifFalse: [dsvList]
selectedRow "This method was generated by UIDefiner. Any edits made here may be lost whenever methods are automatically defined. The initialization provided below may have been preempted by an initialize method." ^selectedRow isNil ifTrue: [selectedRow := nil asValue] ifFalse: [selectedRow]
</methods> <methods> Examples.Dataset2Example <category>initialize-release</category>
initialize | aList | aList := List new. aList add: Employee new initialize. self dsvList list: aList
</methods> <methods> Examples.Dataset2Example class <category>interface specs</category>
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Dataset2Example' #bounds: #(#Rectangle 393 291 733 530 ) ) #component: #(#SpecCollection #collection: #( #(#DataSetSpec #layout: #(#Rectangle 11 8 328 194 ) #model: #dsvList #columns: #( #(#DataSetColumnSpec #labelIsImage: false #width: 30 #rendererType: #rowSelector #editorType: #rowSelector #noScroll: false ) #(#DataSetColumnSpec #model: #'selectedRow name' #label: 'Name' #labelIsImage: false #width: 94 #editorType: #InputField #noScroll: false ) #(#DataSetColumnSpec #model: #'selectedRow empNo' #label: 'Employee Number' #labelIsImage: false #width: 115 #editorType: #InputField #noScroll: false ) #(#DataSetColumnSpec #model: #'selectedRow citizen' #label: 'U.S. Citizen' #labelIsImage: false #width: 80 #rendererType: #CheckBox #editorType: #CheckBox #noScroll: false ) ) ) #(#ActionButtonSpec #layout: #(#Rectangle 101 207 186 230 ) #model: #addRow #label: 'Add Row' #defaultable: true ) ) ) )
</methods> "Imported Classes:" self error: 'Attempting to file-in parcel imports. Choose terminate or close' <class> <name>ApplicationModel</name> <environment>UI</environment> <super>UI.Model</super> <private>false</private> none builder uiSession eventHandlers savedWindowInformation <imports></imports> <category>UIBuilder-Framework</category> <attributes> <package>UIBuilder-Framework</package> </attributes> </class>