Nested Dialogs
- To: mathgroup at smc.vnet.net
- Subject: [mg79795] Nested Dialogs
- From: Albert <awnl at arcor.net>
- Date: Sat, 4 Aug 2007 06:02:07 -0400 (EDT)
Hi,
I am trying to create an modal dialog where a user can give some input
and which offers another modal dialog for part of the input, because in
the real application the input is somewhat lengthy to put into just one
dialog. I want both of them to be modal.
When nesting DialogInput I discovered that the following does not work
as I expected (hoped) it would:
DialogInput[{
Button["Details", DialogInput[DefaultButton[]]],
DefaultButton[]
}]
actually it hangs mathematica, so it will ask whether you want to wait
or abort the dynamic evaluation. When experimenting with CreateDialog I
found it has the option Modal, but this option does not really seem to
change the behaviour of the Dialog. Something else I detected is that
for two nested dialogs DialogReturn[] behaves not exactly as I did expect:
DialogInput[{Button["Details",
CreateDialog[DefaultButton[DialogReturn[2]]]],
DefaultButton[DialogReturn[1]]}]
When I click the Button in the nested dialog, the DialogInput returns 2,
but the window associated with the DialogInput stays on the screen.
I could not find something about the
nesting of Dialogs in the Documentation Center so here are my questions:
- am I misunderstanding or missing something?
- am I asking for too much?
- Is this the intended behavior?
- I am using 6.0.0. Has the situation with 6.0.1 changed for these
things?
- Has anyone some workaround to achieve what I try to do (I know how to
do this with JLink, but then I don't have easy access to all the nice
dynamic stuff within the dialogs...)?
albert