mIRC Homepage
Posted By: NaquadaServ A new option with /dialog - 11/11/05 07:51 PM
I purpose a new feature for dialogs... For when dialogs are layered one on top of the other and the lower dialog(s) are dependent on the most recently opened dialog to close first.

/dialog -w D1 [ D2 ]
-w : Keeps dialog D1 disabled until dialog D2 closes. D2 is optional if dialog is opened with the -a option.

- and/or -

$dialog(DChild, DChildTable, DParent).disableparent

Naquada
Posted By: qwerty Re: A new option with /dialog - 11/11/05 11:42 PM
Isn't that what modal dialogs (created with $dialog()) already do?
Posted By: NaquadaServ Re: A new option with /dialog - 18/11/05 03:36 AM
Nope

You can still select the parent dialog... tested that before posting...
Posted By: qwerty Re: A new option with /dialog - 18/11/05 10:15 AM
Not sure what you're talking about. Did you use -4 as the 3rd parameter in $dialog()? The only condition is that the parent dialog must be active for that to work, but in the vast majority of cases you only want to open a modal dialog from an event coming from the parent one (e.g. user clicking a button). Otherwise you could activate the parent dialog (with /dialog -ev dname1) before calling $dialog(dname2,table2,-4).
Posted By: NaquadaServ Re: A new option with /dialog - 18/11/05 06:00 PM
Yeah... Have you tried it?

-4 or specifing the parent dialog does NOT disable the parent window. The parent dialog can still gain focus, if the parent dialog was disabled this could not occur.
Posted By: qwerty Re: A new option with /dialog - 18/11/05 07:29 PM
You must be doing something wrong because I've used it countless times. Here's an example script that shows how to use it:
Code:
dialog test-parent {
  title "Parent dialog"
  size -1 -1 172 112
  option dbu
  button "Open a modal dialog", 1, 55 48 67 12
}
dialog test-child {
  title "Modal child dialog"
  size -1 -1 121 58
  option dbu
  text "Access parent dialog, if you can!", 1, 7 8 106 9, center
  button "OK", 2, 37 34 47 12, ok
}
on *:dialog:test-parent:sclick:1: return $dialog(test-child,test-child,-4)

Type
/dialog -m test-parent test-parent
or
/dialog -md test-parent test-parent
Posted By: NaquadaServ Re: A new option with /dialog - 19/11/05 01:52 AM
Not sure what the hell I was doing wrong, it works now (in my scripts also)...

blush
© mIRC Discussion Forums