From VisualWorks®, 7.6 of February 1, 2008 on February 1, 2008 at 12:47:23 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>HideExample</name> <environment>Examples</environment> <super>UI.ApplicationModel</super> <private>false</private> none listVisibility colorNames <imports></imports> <category>Examples-Help</category> <attributes> <package>Hide-Example</package> </attributes> </class> <comment> Examples.HideExample
HideExample demonstrates a technique for disabling or hiding a widget.
</comment> <methods> Examples.HideExample <category>change messages</category>
changedListVisibility | wrapper desiredState | wrapper := self builder componentAt: #colorList. desiredState := self listVisibility value. desiredState == #hidden ifTrue: [wrapper beInvisible]. desiredState == #disabled ifTrue: [ wrapper beVisible. wrapper disable]. desiredState == #normal ifTrue: [ wrapper enable. wrapper beVisible].
</methods> <methods> Examples.HideExample <category>aspects</category>
colorNames ^colorNames
listVisibility ^listVisibility
</methods> <methods> Examples.HideExample <category>initialize release</category>
initialize colorNames := SelectionInList with: ColorValue constantNames. listVisibility := #normal asValue. listVisibility onChangeSend: #changedListVisibility to: self.
</methods> <methods> Examples.HideExample class <category>interface specs</category>
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'HideExample' #min: #(#Point 50 50 ) #bounds: #(#Rectangle 490 336 642 618 ) ) #component: #(#SpecCollection #collection: #( #(#RadioButtonSpec #layout: #(#Point 12 21 ) #model: #listVisibility #label: 'Hidden' #select: #hidden ) #(#RadioButtonSpec #layout: #(#Point 12 44 ) #model: #listVisibility #label: 'Disabled' #select: #disabled ) #(#RadioButtonSpec #layout: #(#Point 12 67 ) #model: #listVisibility #label: 'Normal' #select: #normal ) #(#SequenceViewSpec #layout: #(#LayoutFrame 1 0 100 0 -1 1 -1 1 ) #name: #colorList #model: #colorNames ) ) ) )
</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>