changed: #submenuInterface:
authorClaus Gittinger <cg@exept.de>
Tue, 11 May 2010 12:54:30 +0200
changeset 277910fef360ad85
parent 2778 6d59e67bcd8a
child 2780 a2efb4d1d368
changed: #submenuInterface:

fixed display of model; added display of actions
Tools__ViewTreeApplication.st
     1.1 --- a/Tools__ViewTreeApplication.st	Tue May 11 12:03:35 2010 +0200
     1.2 +++ b/Tools__ViewTreeApplication.st	Tue May 11 12:54:30 2010 +0200
     1.3 @@ -1368,7 +1368,7 @@
     1.4      list add:(MenuDesc separator).
     1.5  
     1.6      (view respondsTo:#'model:') ifTrue:[
     1.7 -        inst := model.
     1.8 +        inst := view model.
     1.9  
    1.10          inst isNil ifTrue:[ label := value := nil ]
    1.11                    ifFalse:[ label := inst displayString.
    1.12 @@ -1398,6 +1398,20 @@
    1.13          list add:(MenuDesc title:'enableChannel' value:label action:value).
    1.14      ].
    1.15  
    1.16 +    #( #action #pressaAction #releaseAction ) do:[:actionSelector |
    1.17 +        (view respondsTo:actionSelector) ifTrue:[
    1.18 +            inst := view perform:actionSelector.
    1.19 +
    1.20 +            inst isNil 
    1.21 +                ifTrue:[ label := value := nil ]
    1.22 +                ifFalse:[ label := inst displayString.
    1.23 +                            value := [ (view perform:actionSelector) inspect ].
    1.24 +                        ].
    1.25 +
    1.26 +            list add:(MenuDesc title:'action' value:label action:value).
    1.27 +        ].
    1.28 +    ].
    1.29 +
    1.30      list last isSeparator ifFalse:[ list add:(MenuDesc separator) ].
    1.31  
    1.32      (view respondsTo:#listHolder) ifTrue:[
    1.33 @@ -1423,6 +1437,8 @@
    1.34  
    1.35      list last isSeparator ifTrue:[ list removeLast ].
    1.36    ^ MenuDesc buildFromList:list onGC:aMenu
    1.37 +
    1.38 +    "Modified: / 11-05-2010 / 12:53:24 / cg"
    1.39  !
    1.40  
    1.41  submenuVisibility:aMenu