jannik what guillermo did in the past was to use
MenuMorph chooseFrom: choices values: choices lines: #() title: ('display type (currently {1})' translated format:{displayType}). I will study this implementation to see how it fits with what I did. Stef On Mar 11, 2013, at 10:25 PM, stephane ducasse <stephane.duca...@free.fr> wrote: > The problem is that selectedValue will not work on other menuItem :) > So I'm playing with something like that. > > setFFTSize > "Set the size of the FFT used for frequency analysis." > > | aMenu sz on | > aMenu := MenuMorph new title: ('FFT size (currently {1})' translated > format:{fft n}). > ((7 to: 10) collect: [:n | 2 raisedTo: n]) do: [ :r | aMenu add: r > printString value: r]. > sz := (aMenu invokeAt: World activeHand position in: World > allowKeyboard: true) selectedValue. > > sz ifNil: [^ self]. > on := soundInput isRecording. > self stop. > fft := FFT new: sz. > self resetDisplay. > on ifTrue: [self start]. > > > it means that probably we should rethink the protocol between the menu and > the menuItem. > > I do not like my code. Especially that line above. > Now going to sleep in this freezing time. > Stef