From VisualWorks®, 7.6 of February 1, 2008 on February 1, 2008 at 12:48:03 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>Notebook5Example</name> <environment>Examples</environment> <super>UI.ApplicationModel</super> <private>false</private> none majorKeys classNames classComment <imports></imports> <category>Examples-Help</category> <attributes> <package>Notebook5-Example</package> </attributes> </class> <comment> Examples.Notebook5Example
Notebook5Example demonstrates connecting a notebook widget to a Text widget.
</comment> <methods> Examples.Notebook5Example <category>change messages</category>
changedClass | chosenClass newText | chosenClass := self classNames selection. newText := chosenClass isNil ifTrue: [''] ifFalse: [(Smalltalk at: chosenClass) comment]. self classComment value: newText.
changedLetter | chosenLetter list | chosenLetter := self majorKeys selection last. list := Core classNames select: [ :name | name first == chosenLetter]. self classNames list: list.
</methods> <methods> Examples.Notebook5Example <category>aspects</category>
classComment ^classComment
classNames ^classNames
majorKeys ^majorKeys
</methods> <methods> Examples.Notebook5Example <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: #changedLetter to: self. classNames := SelectionInList new. classNames selectionIndexHolder onChangeSend: #changedClass to: self. classComment := '' asValue.
</methods> <methods> Examples.Notebook5Example <category>interface opening</category>
postOpenWith: aBuilder (aBuilder componentAt: #pageHolder) widget client: self spec: #listSpec. majorKeys selectionIndex: 1.
</methods> <methods> Examples.Notebook5Example 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 176 285 376 485 ) ) #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: 'Notebook5Example' #min: #(#Point 20 20 ) #bounds: #(#Rectangle 223 263 863 607 ) ) #component: #(#SpecCollection #collection: #( #(#NoteBookSpec #layout: #(#LayoutFrame 10 0 40 0 0 0.5 -10 1 ) #name: #pageHolder #model: #majorKeys #binderWidth: 40 #rightInset: 24 #bottomInset: 0 ) #(#LabelSpec #layout: #(#AlignmentOrigin 0 0.5 10 0 0.5 0 ) #label: 'A notebook connected to a text editor' #style: #large ) #(#TextEditorSpec #layout: #(#LayoutFrame 10 0.5 40 0 -10 1 -10 1 ) #model: #classComment ) ) ) )
</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>