Open Morph in a Two Option Dialog

122 Views Asked by At

If I have a Morph how can I open it in a dialog with yes/no or accept/cancel buttons?

I know that spec provides a nice api to specify a dialog window, but spec works with its models

1

There are 1 best solutions below

0
Nicolai Hess On

do you mean "use a custom morph as content for a dialog window"?

We have a PluggableDialogWindow, for example, this uses the Pharo logo (as an ImageMorph) as the content for a OK/Cancel dialog

(Smalltalk ui theme newPluggableDialogWindowIn: World title: 'Dialog' for: (PolymorphSystemSettings pharoLogoForm asMorph)) openModal