Hello,

I'm looking for a modal menu. It should stop method code execution until any left mouse klick. I tried MenuMorph with code like below, but this does not stop execution. Any hint?

thank you

cjb

ComposableModel subclass: #BachitophTestWindow
        instanceVariableNames: ''
        classVariableNames: ''
        poolDictionaries: ''
        category: 'Trimfox'.

BachitophTestWindow compile: 'initializeWidgets'.

    |window menu choice|
window := BachitophTestWindow new openWithSpecLayout: SpecLayout composed.
    menu := MenuMorph new
        defaultTarget: window;
        color: (window theme menuColorFor: window);
addToggle: 'abcabcabcabc' target: window selector: #yourself"(labels at: 1)";
        addToggle: 'cdfgcdfgcdfg' target: window selector: #yourself;
        addLine;
        addToggle: 'hijkhijkhijk' target: window selector: #yourself;
        yourself.
    choice := menu popUpInWorld.
    choice selectedItem isNil
ifTrue: [ choice := 'abc' ] ifFalse: [choice := choice selectedItem contents].
    self halt.



Reply via email to