mIRC Home    About    Download    Register    News    Help

Print Thread
#135450 11/11/05 07:51 PM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
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


NaquadaBomb
www.mirc-dll.com
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Isn't that what modal dialogs (created with $dialog()) already do?


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Dec 2002
Posts: 580
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Nope

You can still select the parent dialog... tested that before posting...


NaquadaBomb
www.mirc-dll.com
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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).


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Dec 2002
Posts: 580
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
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.


NaquadaBomb
www.mirc-dll.com
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Dec 2002
Posts: 580
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Not sure what the hell I was doing wrong, it works now (in my scripts also)...

blush


NaquadaBomb
www.mirc-dll.com

Link Copied to Clipboard