From VisualWorks®, 7.6 of February 1, 2008 on February 1, 2008 at 12:46:16 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>Adaptor6Example</name> <environment>Examples</environment> <super>UI.ApplicationModel</super> <private>false</private> none accountID <imports></imports> <category>Examples-Help</category> <attributes> <package>Adapt6-Example</package> </attributes> </class> <comment> Examples.Adaptor6Example
Adaptor6Example class demonstrates the use of a custom adaptor (PluggableAdaptor) to perform specified actions when updating the application and/or domain models. Browse the initialize method for an example of configuring the adaptor to perform get, set (put), and update actions.
</comment> <methods> Examples.Adaptor6Example <category>aspects</category>
accountID ^accountID
accountID: aNumber accountID := aNumber
paddedID | paddedID | paddedID := PluggableAdaptor on: self. paddedID getBlock: [ :model | | paddedString | paddedString := model accountID printString. 6 - paddedString size timesRepeat: [paddedString := '0', paddedString]. paddedString] putBlock: [ :model :value | model accountID: value asNumber] updateBlock: [ :model :aspect :parameter | false]. ^paddedID
</methods> <methods> Examples.Adaptor6Example <category>initialize-release</category>
initialize accountID := 1.
</methods> <methods> Examples.Adaptor6Example class <category>interface specs</category>
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Adaptor6Example' #min: #(#Point 200 115 ) #max: #(#Point 200 115 ) #bounds: #(#Rectangle 747 395 947 510 ) ) #component: #(#SpecCollection #collection: #( #(#InputFieldSpec #layout: #(#Rectangle 94 31 193 57 ) #model: #paddedID ) #(#LabelSpec #layout: #(#Point -1 32 ) #label: 'Account ID' ) #(#LabelSpec #layout: #(#Point 73 75 ) #label: '(This field uses a' #style: #small ) #(#LabelSpec #layout: #(#Point 68 91 ) #label: 'PluggableAdaptor)' #style: #small ) ) ) )
</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>