Modal dialogs come up in different layers?

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

Modal dialogs come up in different layers?

Stephan Eggermont-3
What's the difference between a ColorSelectorDialogWindow and a
TextEntryDialogWindow? I call them in the same way from a palette,
but the color dialog comes up over the palette, and the person
dialog below. Both palettes are in layer 20. The low layer number seems
to interfere with modality.

addColor
        | dialog |
        dialog := ColorSelectorDialogWindow new
                title: 'Choose color';
                selectedColor: self color;
                setProperty: #morphicLayerNumber toValue: 18.
        self openModal: dialog.
        dialog cancelled
                ifFalse: [self addMorphBack: (ColorWell on: dialog selectedColor)]

addPerson
        |dialog|
        dialog := TextEntryDialogWindow new
                textFont: UITheme current textFont;
                title: 'Add person';
                text: 'The email address';
                entryText: '';
                setProperty: #morphicLayerNumer toValue: 18.
        self openModal: dialog.
        dialog ifNil: [ ^self ].
        (dialog cancelled or: [dialog entryText isNil]) ifFalse:
                [self addMorphBack: (PersonWell on: dialog entryText)]

Stephan

Screenshot from 2015-06-16 20:49:09.png (27K) Download Attachment
Screenshot from 2015-06-16 20:56:47.png (37K) Download Attachment