Originally Posted By: Wims
I don't want to make a modal dialog with $input, I just don't want people to be able to access the dialog if an $input from my code is called


That is exactly what "modal" means, so, yes, you do want to make a modal dialog. However,

Originally Posted By: Wims
ie: I do want the u switch, I do want the dialog to be the parent window of that $input.


This does not follow. It might be true that all modal dialogs have parent windows (fyi, this is not even true, some modal dialogs have "no" parent windows), but it is NOT true that all windows with an associated parent window must necessarily be modal, which is what you're implying. There are situations where you could want a modeless dialog to assign a parent window, therefore "assign parent window" != "modal"; they are two fairly different behaviours. In your case, due to a side-effect of mIRC, you're under the impression that they're the same.

Originally Posted By: Wims
"use the current active window as the parent window" does really sound like what I need


It's not. "Use the current active window as the parent window" should do just that and nothing more. It should associate the MDI child window with the active window as a parent, ie. this. Associating with a parent has no effect on modality (modal or modeless). As an example, mIRC #channel windows are MDI child windows of the main mIRC window, but they are not modal. There are times when you would need the functionality of a child window in either a modal or a modeless scenario. Therefore, yes, it seems to me as though the modal behaviour of $input with u is a side-effect, unless Khaled intended on this. If so, it should be documented. Otherwise, we should have a separate switch to denote modeless/modal $input.

Finally, one last example of why you might want to use the 'u' switch to create a modeless (non-modal) $input() dialog inside of a dialog window: associating with a parent window will make it so that all child windows close when the parent window does. This can be important, especially with modeless dialogs. If you create an $input() and the parent window closes, you'd want the $input to close. The u switch would do this, in that case, but unfortunately the u switch would also make it modal. In this sense, the behaviour is different from the description in the help file, and it makes me question whether it's intended or not.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"