From VisualWorks®, 7.6 of February 1, 2008 on February 1, 2008 at 12:47:21 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>FieldTypeExample</name> <environment>Examples</environment> <super>UI.ApplicationModel</super> <private>false</private> none time price <imports></imports> <category>Examples-Help</category> <attributes> <package>FieldType-Example</package> </attributes> </class> <comment> Examples.FieldTypeExample
FieldTypeExample demonstrates how to create a custom data type converter, by specifying a TypeConverter.
</comment> <methods> Examples.FieldTypeExample <category>aspects</category>
price ^price isNil ifTrue: [price := (TypeConverter onNumberValue: 0 asValue format: '$###,###,###.##')] ifFalse: [price]
time ^time isNil ifTrue: [time := (TypeConverter onTimeValue: Time now asValue)] ifFalse: [time]
</methods> <methods> Examples.FieldTypeExample class <category>interface specs</category>
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'FieldTypeExample' #min: #(#Point 215 112 ) #max: #(#Point 215 112 ) #bounds: #(#Rectangle 411 347 626 459 ) ) #component: #(#SpecCollection #collection: #( #(#InputFieldSpec #layout: #(#Rectangle 85 30 204 56 ) #model: #time #tabable: false #alignment: #right ) #(#LabelSpec #layout: #(#Point 22 29 ) #label: 'Time' ) #(#LabelSpec #layout: #(#Point 21 65 ) #label: 'Money' ) #(#InputFieldSpec #layout: #(#Rectangle 85 66 204 92 ) #model: #price #tabable: false #alignment: #right #type: #string ) ) ) )
</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>