VW7.4.1 menu behaves differently ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VW7.4.1 menu behaves differently ?

BREITH Karl-Albert (AREVA)
Hi All !
 
The little piece of code below worked just fine for VW7.3.1.
Now I have made the transition to VW7.4.1. The generated menu end up having all
labels correctly, but as value always [ self setStartDirectory: 'UnixFileName('/')']
instead of having the tree of directories available.
I assume there is another method in the virtual machine to optimize code ?
 
buildSettingsMenu
 | menu subMenu directory |
 menu := self builder menuAt: #menuBar.
 subMenu := (menu menuItemLabeled: 'Settings') submenu.
 subMenu := (subMenu menuItemLabeled: 'Start Directory') submenu.
 subMenu menuItems do: [:each | subMenu removeItem: each].
 subMenu addItemLabel: 'select ...' value: #selectStartDirectory.
 directory := self directoryList list first.
 [directory ~= Filename separator asString] whileTrue:
   [| newDir |
   newDir := directory asFilename head.
   newDir ~= directory
    ifTrue:
     [subMenu addItemLabel: directory value: [self setStartDirectory: directory].
     directory := newDir]
    ifFalse: [directory := Filename separator asString]]
 
________________________________________________________________
Karl-Albert Breith
AREVA NP GmbH
FEEC - G
Freyeslebenstrasse 1
91058 Erlangen
Phone: +49 (0) 9131 18-97393
Fax: +49 (0) 9131 18-94045
mail to:  [hidden email]
An AREVA and Siemens company