Trying to use modal dialog in main window in desktop app

it seems like the simplest stuff confuses me, i apologize.
The main window in my desktop app is called DGwindow
i have almost everything within this window.

i literally copy/pasted the script from the manual regarding messagedialog.
of course i adjusted for anything i have named differently.
when i try to compile, i get this error(over and over with everything i try.

DGwindow.modalTest.Pressed, line 10
Parameter “parent” expects class Window, but this is class DGwindow.DGwindow.
dialogButton = dialog.ShowModalWithin(self)

the above error message highlights “self” in dialog.showmodalwithin(self) -as the problem

what else might work there?
–the super of my window is DesktopWindow–

Have you tried the API2 equivalent?
dialogButton = dialog.ShowModal(self)

I think ShowModalWithin (the API1 version) produces the error message you’re given.

1 Like