Tools__ViewTreeApplication.st
changeset 3040 b62c4b71910c
parent 3037 876c28de42da
child 3049 292d06e8b7ae
     1.1 --- a/Tools__ViewTreeApplication.st	Wed Jul 31 11:23:27 2013 +0200
     1.2 +++ b/Tools__ViewTreeApplication.st	Wed Jul 31 13:13:51 2013 +0200
     1.3 @@ -1426,7 +1426,7 @@
     1.4  submenuInspector:aMenu
     1.5      "builds and returns the inspector submenu"
     1.6  
     1.7 -    |view list n names label value|
     1.8 +    |view list n names label value indices|
     1.9  
    1.10      view := self selectedView.
    1.11      view isNil ifTrue:[^ nil].
    1.12 @@ -1436,10 +1436,12 @@
    1.13  
    1.14      list  := OrderedCollection new:n.
    1.15      names := view class allInstVarNames.
    1.16 +    indices := (1 to:names size) asArray.
    1.17 +    names sortWith:indices.
    1.18  
    1.19      1 to:n do:[:i| |action|
    1.20          label := (names at:i) printString.
    1.21 -        value := view instVarAt:i.
    1.22 +        value := view instVarAt:(indices at:i).
    1.23          value isNil ifTrue:[
    1.24              value  := '------'.
    1.25              action := nil.
    1.26 @@ -1451,6 +1453,8 @@
    1.27      ].
    1.28  
    1.29      ^ MenuDesc buildFromList:list onGC:aMenu
    1.30 +
    1.31 +    "Modified: / 31-07-2013 / 13:12:52 / cg"
    1.32  !
    1.33  
    1.34  submenuInterface:aMenu
    1.35 @@ -1542,7 +1546,7 @@
    1.36                              value := [ (view perform:actionSelector) inspect ].
    1.37                          ].
    1.38  
    1.39 -            list add:(MenuDesc title:'action' value:label action:value).
    1.40 +            list add:(MenuDesc title:actionSelector"'action'" value:label action:value).
    1.41          ].
    1.42      ].
    1.43  
    1.44 @@ -1574,7 +1578,7 @@
    1.45      list last isSeparator ifTrue:[ list removeLast ].
    1.46      ^ MenuDesc buildFromList:list onGC:aMenu
    1.47  
    1.48 -    "Modified: / 27-04-2012 / 14:22:34 / cg"
    1.49 +    "Modified: / 31-07-2013 / 13:09:55 / cg"
    1.50  !
    1.51  
    1.52  submenuVisibility:aMenu