45209Re: Does anyone know?
- Jul 3, 2012I detailed the problem in message 37913 and subsequent. The most troublesome aspect is that a radio button event can be invoked immediately after the dialog is closed, which makes no sense at all.
(By the way, I have discovered that such delayed events can also occur when opening a dialog. For example, say you have Window A open and you select a menu, such that the menu list partly covers Window A. You then click on one of the listed menu items, which opens a dialog. If you happen to double-click on the menu item (being spastic like myself), the dialog will open but then a double-click event is generated for Window A (because Window A was under the menu). If the dialog is opened in a true subroutine but the double-click event is handled through a branch label, the branch label will be unknown within the subroutine and a crash occurs.)
I suspect these event-timing problems are due to LB, not Windows.
As to the question "why not use modal dialogs?" Because they don't locate where you want them and they crash when used with certain controls. And in certain cases they cease to be "modal".
--- In firstname.lastname@example.org, Stefan Pendl <pendl2megabit@...> wrote:
> Am 03.07.2012 02:14, schrieb Sam:
> > Modal dialogs may open in the upper left of the controlling window if you use position 1, 1, but for other values I have found the position largely random, and not always repeatable.
> Dialog windows inherit the DPI settings of the screen for their
> position, see http://libertybasicbugs.wikispaces.com/DIALOG-wrong+position
> Modal dialogs shouldn't be affected, but I don't know your environment,
> where that happened.
> > There are some other strange behaviors of controls on modal windows, such as radio buttons. Also, the idea of a modal dialog is to force the user to deal with it before returning to the controlling window. But if you carry it too far, with window A opening modal dialog B which opens modal dialog C, it suddenly becomes possible to activate window A without closing B and C.
> I haven't encountered any of those two situations, would you mind
> setting up an example to duplicate that problem?
> Detailed steps to reproduce it and the environment you are running on
> would be needed too.
> > Bottom line, you should probably avoid modal dialogs and simply deactivate window A as soon as window B is opened, then reactivate it when B is closed.
> Why would one like to have such a complicate way of doing things, when
> Windows is offering modal dialogs?
> Stefan Pendl
> LB 4.04 Pro ... http://www.libertybasic.com/assist.html
> LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe
> LB Community Wiki .............. http://basic.wikispaces.com/
> LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
> LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/
> Books at http://www.lulu.com/ and http://www.amazon.com/
> Alyce Watson ... APIs for Liberty BASIC
> Carl Gundel .... Beginning Programming with Liberty BASIC
> Windows 7 Home Premium 64-bit SP1
> AMD Turion X2 RM-70 2GHz, 4GB RAM
- << Previous post in topic Next post in topic >>