cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum

Modeless dialogs

Oleg
Advocate
The API doc states:
"API-based Add-Ons CANNOT handle modeless dialog boxes. Use Palettes
instead."

It is a pity, I need a modeless dialog, not a palette. Though I tried to
open modeless dialog box, as far as I remember, I had problems and it
seems this dialogs really impossible to use.
May be anybody knows any safe workaround to use it ?
5 REPLIES 5

Ralph Wessel
Mentor
Oleg wrote:
The API doc states:
"API-based Add-Ons CANNOT handle modeless dialog boxes. Use Palettes
instead."
I use modeless dialogs for 'About' windows. It works well, but they don't do much either. It can be a bit confusing from a user's point of view because window commands like 'Close' don't apply to it, and close the window behind instead.

What kind of effect are you trying to achieve?
Ralph Wessel BArch

Oleg
Advocate
Ralph wrote:
I use modeless dialogs for 'About' windows. It works well, but they don't do much either. It can be a bit confusing from a user's point of view because window commands like 'Close' don't apply to it, and close the window behind instead.

What kind of effect are you trying to achieve?
I want complex (multiwindow) modeless dialogs, like the GDL object editor.
Palettes differ at event messages and behaviour.
I opened modeless dialog (class derived from ModelessDialog)
using palette's APIPaletteControlCallBackProc callback.
It worked basically, but I had problems ( unhandled exception )
at its closing.
Though I could make something wrong, I assume, that this way is not
quite correct.

Akos Somorjai
Graphisoft
Graphisoft
ArchiCAD keeps track of the window order internally. In that order, modeless dialogs (e.g. the floor plan window) have a special place, and they also have a quite complex internal registration mechanism, which is not available through the API.

You can do most of the things you need modeless dialogs for from a modal dialog. For example, you can switch between databases. Or maybe you can split the interface interface between modal dialogs and palettes.

HTH,

Akos

Oleg
Advocate
Akos wrote:
ArchiCAD keeps track of the window order internally. In that order, modeless dialogs (e.g. the floor plan window) have a special place, and they also have a quite complex internal registration mechanism, which is not available through the API.
Akos, thank you for the information.
Akos wrote:
You can do most of the things you need modeless dialogs for from a modal dialog. For example, you can switch between databases. Or maybe you can split the interface interface between modal dialogs and palettes.
Akos
When modal dialog is open it is impossible to use a palette or the menu.
The palette almost suitable, however it does not receive DG_MSG_TOPSTATUSCHANGE messages same way as modeless dialog.
Anyway thanks, I shall think more.

PS:
I only reflect on a possible experimental project.
It is like a visual resource editor, it would looks like the VC2003
form editor, but using only GS API for DG Controls and almost platform independent.
For example for GDL UI Script editor or grc dialog editor.
I have made the small prototype of the main design panel with the
purpose of check of technical feasibility.

Karl Ottenstein
Moderator
Oleg wrote:
I only reflect on a possible experimental project.
It is like a visual resource editor, it would looks like the VC2003
form editor, but using only GS API for DG Controls and almost platform independent.
For example for GDL UI Script editor or grc dialog editor.
I hope GS will do what they can in the SDK to support your efforts, Oleg, as this would be a huge benefit to GDL and API coders! 😉

The modal part of it would make the interface a bit non-standard, since any menus/commands would have to be part of the dialog or other palette. But, better strange than not at all! 😉 Good luck and keep us posted.

Karl
One of the forum moderators   •   AC 26 USA and earlier   •   macOS 12.6.1, iMac Pro 10-Core, Radeon Pro Vega 64

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!