--- a/PullDMenu.st Wed Apr 10 22:25:49 1996 +0200
+++ b/PullDMenu.st Fri Apr 12 19:08:03 1996 +0200
@@ -404,44 +404,46 @@
!
add:label selector:selector after:indexOrString
- "add a new title-item after an existing item, indexOrString,
- or at the end if the after-arg is nil.
- The corresponding label can later be set with #at:putMenu:
- or #at:putLabels:selectors:..."
+ "add a new title-item after an existing item, indexOrString,
+ or at the end if the after-arg is nil.
+ The corresponding label can later be set with #at:putMenu:
+ or #at:putLabels:selectors:..."
- |idx|
+ |idx|
- indexOrString isNil ifTrue:[
- idx := titles size
- ] ifFalse:[
- idx := self indexOf:indexOrString.
- ].
+ indexOrString isNil ifTrue:[
+ idx := titles size
+ ] ifFalse:[
+ idx := self indexOf:indexOrString.
+ ].
- titles isNil ifTrue:[
- menus := Array with:nil.
- titles := Array with:label.
- selectors := Array with:nil.
- ] ifFalse:[
- menus := (menus copyTo:idx) , #(nil) , (menus copyFrom:idx+1).
- titles := ((titles copyTo:idx) copyWith:label) , (titles copyFrom:idx+1).
- selectors := ((selectors copyTo:idx) copyWith:selector) , (selectors copyFrom:idx+1).
- ].
+ titles isNil ifTrue:[
+ menus := Array with:nil.
+ titles := Array with:label.
+ selectors := Array with:selector.
+ ] ifFalse:[
+ menus := (menus copyTo:idx) , #(nil) , (menus copyFrom:idx+1).
+ titles := ((titles copyTo:idx) copyWith:label) , (titles copyFrom:idx+1).
+ selectors := ((selectors copyTo:idx) copyWith:selector) , (selectors copyFrom:idx+1).
+ ].
- "
- |top m|
+ "
+ |top m|
- top := StandardSystemView new.
- m := PullDownMenu in:top.
- m labels:#('file' 'edit').
- m selectors:#(file #edit).
+ top := StandardSystemView new.
+ m := PullDownMenu in:top.
+ m labels:#('file' 'edit').
+ m selectors:#(file #edit).
- m add:'help' selector:#help after:#file.
- m at:#help putMenu:(MenuView labels:#('foo' 'bar')
- selectors:#(foo bar)
- receiver:nil).
+ m add:'help' selector:#help after:#file.
+ m at:#help putMenu:(MenuView labels:#('foo' 'bar')
+ selectors:#(foo bar)
+ receiver:nil).
- top open
- "
+ top open
+ "
+
+ "Modified: 12.4.1996 / 19:02:47 / cg"
!
at:aString putLabels:labels selector:selector args:args receiver:anObject
@@ -1403,5 +1405,5 @@
!PullDownMenu class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Attic/PullDMenu.st,v 1.44 1996-03-24 18:00:23 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Attic/PullDMenu.st,v 1.45 1996-04-12 17:08:03 cg Exp $'
! !