From VisualWorks®, 7.6 of February 1, 2008 on February 1, 2008 at 12:47:55 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>Notebook2Example</name> <environment>Examples</environment> <super>UI.ApplicationModel</super> <private>false</private> none majorKeys minorKeys classNames <imports></imports> <category>Examples-Help</category> <attributes> <package>Notebook2-Example</package> </attributes> </class> <comment> Examples.Notebook2Example
Notebook2Example demonstrates a notebook widget with major and minor tabs.
</comment> <methods> Examples.Notebook2Example <category>change messages</category>
changedPage | chosenLetter list filter filteredList | "Major key." chosenLetter := self majorKeys selection last. list := Core classNames, Examples classNames select: [ :name | name first == chosenLetter]. "Minor key." filter := self minorKeys selection value. filter == #all ifTrue: [filteredList := list] ifFalse: [filteredList := list select: [ :name | '*Example' match: name]]. self classNames list: filteredList.
</methods> <methods> Examples.Notebook2Example <category>aspects</category>
classNames ^classNames
majorKeys ^majorKeys
minorKeys ^minorKeys
</methods> <methods> Examples.Notebook2Example <category>initialize-release</category>
initialize | letters | letters := #( ' A' ' B' ' C' ' D' ' E' ' F' ' G' ' H' ' I' ' J' ' K' ' L' ' M' ' N' ' O' ' P' ' Q' ' R' ' S' ' T' ' U' ' V' ' W' ' X' ' Y' ' Z' ). majorKeys := SelectionInList with: letters. majorKeys selectionIndexHolder onChangeSend: #changedPage to: self. minorKeys := SelectionInList with: (Array with: 'All classes'-> #all with: 'Examples only' -> #examples). minorKeys selectionIndexHolder onChangeSend: #changedPage to: self. classNames := SelectionInList new.
</methods> <methods> Examples.Notebook2Example <category>interface opening</category>
postOpenWith: aBuilder (builder componentAt: #pageHolder) widget client: self spec: #listSpec. majorKeys selectionIndex: 1. minorKeys selectionIndex: 1.
</methods> <methods> Examples.Notebook2Example class <category>interface specs</category>
listSpec "UIPainter new openOnClass: self andSelector: #listSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Unlabeled Canvas' #min: #(#Point 20 20 ) #bounds: #(#Rectangle 406 376 606 576 ) ) #component: #(#SpecCollection #collection: #( #(#SequenceViewSpec #layout: #(#LayoutFrame 1 0 1 0 -1 1 -1 1 ) #model: #classNames ) ) ) )
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Notebook2Example' #min: #(#Point 20 20 ) #bounds: #(#Rectangle 457 374 814 718 ) ) #component: #(#SpecCollection #collection: #( #(#NoteBookSpec #layout: #(#LayoutFrame 10 0 40 0 -10 1 -10 1 ) #name: #pageHolder #model: #majorKeys #secondModel: #minorKeys #binderWidth: 40 #rightInset: 24 ) #(#LabelSpec #layout: #(#AlignmentOrigin 0 0.5 10 0 0.5 0 ) #label: 'A notebook with two sets of tabs' #style: #large ) ) ) )
</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>