use new menu-creation message in PopUpMenu.
--- a/ConInspV.st Sat Apr 25 14:34:58 1998 +0200
+++ b/ConInspV.st Sat Apr 25 15:46:16 1998 +0200
@@ -369,41 +369,31 @@
!ContextInspectorView methodsFor:'initialization'!
fieldMenu
+ "return a popUpMenu for the left (fields) pane"
+
<resource: #programMenu >
- |labels selectors|
+ |items|
showingTemporaries ifFalse:[
- labels := #(
- 'inspect'
- 'basicInspect'
- '-'
- 'show temporaries'
- ).
- selectors := #(
- doInspect
- doBasicInspect
- nil
- showTemporaries
- )
+ items := #(
+ ('inspect' #inspect)
+ ('basicInspect' #basicInspect)
+ ('-')
+ ('show temporaries' #showTemporaries)
+ )
] ifTrue:[
- labels := #(
- 'inspect'
- 'basicInspect'
- '-'
- 'hide temporaries'
- ).
- selectors := #(
- doInspect
- doBasicInspect
- nil
- hideTemporaries
- )
+ items := #(
+ ('inspect' #inspect)
+ ('basicInspect' #basicInspect)
+ ('-')
+ ('hide temporaries' #hideTemporaries)
+ )
].
^ PopUpMenu
- labels:(resources array:labels)
- selectors:selectors
+ itemList:items
+ resources:resources
"Modified: / 29.10.1997 / 03:40:03 / cg"
!
@@ -437,14 +427,16 @@
!
setDoitActionIn:aWorkspace for:aContext
- aWorkspace doItAction:[:theCode |
- Compiler evaluate:theCode
- in:aContext
- receiver:nil
- notifying:aWorkspace
- logged:true
- ifFail:nil
- ]
+ aWorkspace
+ doItAction:[:theCode |
+ Compiler
+ evaluate:theCode
+ in:aContext
+ receiver:nil
+ notifying:aWorkspace
+ logged:true
+ ifFail:nil
+ ]
!
valueAtLine:lineNr
@@ -492,15 +484,18 @@
!ContextInspectorView methodsFor:'user actions'!
doAccept:theText
+ "text in the right pane was accepted - evaluate the contents and
+ assign to the selected field"
+
|value|
selectedLine notNil ifTrue:[
- value := Compiler evaluate:theText
- receiver:inspectedObject
- notifying:workspace.
+ value := Compiler evaluate:theText
+ receiver:inspectedObject
+ notifying:workspace.
- "yes, you can do that with a context"
- inspectedContext at:selectedLine put:value.
+ "yes, you can do that with a context"
+ inspectedContext at:selectedLine put:value.
].
!
@@ -525,5 +520,5 @@
!ContextInspectorView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Attic/ConInspV.st,v 1.41 1998-04-02 17:12:01 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Attic/ConInspV.st,v 1.42 1998-04-25 13:46:16 cg Exp $'
! !
--- a/ContextInspectorView.st Sat Apr 25 14:34:58 1998 +0200
+++ b/ContextInspectorView.st Sat Apr 25 15:46:16 1998 +0200
@@ -369,41 +369,31 @@
!ContextInspectorView methodsFor:'initialization'!
fieldMenu
+ "return a popUpMenu for the left (fields) pane"
+
<resource: #programMenu >
- |labels selectors|
+ |items|
showingTemporaries ifFalse:[
- labels := #(
- 'inspect'
- 'basicInspect'
- '-'
- 'show temporaries'
- ).
- selectors := #(
- doInspect
- doBasicInspect
- nil
- showTemporaries
- )
+ items := #(
+ ('inspect' #inspect)
+ ('basicInspect' #basicInspect)
+ ('-')
+ ('show temporaries' #showTemporaries)
+ )
] ifTrue:[
- labels := #(
- 'inspect'
- 'basicInspect'
- '-'
- 'hide temporaries'
- ).
- selectors := #(
- doInspect
- doBasicInspect
- nil
- hideTemporaries
- )
+ items := #(
+ ('inspect' #inspect)
+ ('basicInspect' #basicInspect)
+ ('-')
+ ('hide temporaries' #hideTemporaries)
+ )
].
^ PopUpMenu
- labels:(resources array:labels)
- selectors:selectors
+ itemList:items
+ resources:resources
"Modified: / 29.10.1997 / 03:40:03 / cg"
!
@@ -437,14 +427,16 @@
!
setDoitActionIn:aWorkspace for:aContext
- aWorkspace doItAction:[:theCode |
- Compiler evaluate:theCode
- in:aContext
- receiver:nil
- notifying:aWorkspace
- logged:true
- ifFail:nil
- ]
+ aWorkspace
+ doItAction:[:theCode |
+ Compiler
+ evaluate:theCode
+ in:aContext
+ receiver:nil
+ notifying:aWorkspace
+ logged:true
+ ifFail:nil
+ ]
!
valueAtLine:lineNr
@@ -492,15 +484,18 @@
!ContextInspectorView methodsFor:'user actions'!
doAccept:theText
+ "text in the right pane was accepted - evaluate the contents and
+ assign to the selected field"
+
|value|
selectedLine notNil ifTrue:[
- value := Compiler evaluate:theText
- receiver:inspectedObject
- notifying:workspace.
+ value := Compiler evaluate:theText
+ receiver:inspectedObject
+ notifying:workspace.
- "yes, you can do that with a context"
- inspectedContext at:selectedLine put:value.
+ "yes, you can do that with a context"
+ inspectedContext at:selectedLine put:value.
].
!
@@ -525,5 +520,5 @@
!ContextInspectorView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/ContextInspectorView.st,v 1.41 1998-04-02 17:12:01 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/ContextInspectorView.st,v 1.42 1998-04-25 13:46:16 cg Exp $'
! !