cbpporter Messages: 1427 Registered: September 2007
Ultimate Contributor
So I noticed that when using the Setting dialog in TheIDE, changes instantly reflect in the current editor, without having to click Apply or anything.
So I thought that is a great idea and tried to implement that to my dialogs.
I looked over the code in TheIDE and the dialog is opened by Ide::SetupFormat(). Bu this does nothing special. It has a loop like this:
for(;;) {
int c = dlg.Run();
UpdateFormat();
if(c == IDEXIT)
break;
}
The thing I'm not figuring out how this updates the editor asynchronously. I tried similar code with my dialog and the updates happen only when closing the dialog...
Since we were recently on the topic of how to make U++ more popular, code like that might as well be voodoo for the casual GUI enthusiast.
It may be short but it is hard to understand and probably most people will skip trying to. Also when dealing with callback, the difference between <<, <<= and = is a bit too much.