Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #14529
| From | David Bailey <dave@removedbailey.co.uk> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: can't get InputField to work inside a While command |
| Date | 2013-05-18 06:38 +0000 |
| Message-ID | <kn77lc$8j7$1@smc.vnet.net> (permalink) |
| References | <kmso9j$h67$1@smc.vnet.net> <kmvbdl$nok$1@smc.vnet.net> <kn4q33$2b5$1@smc.vnet.net> |
| Organization | Time-Warner Telecom |
On 17/05/2013 09:34, Dushan Mitrovich wrote:> Okay, thanks for the
clarification. It seems I can't use InputField the
> way I intended in a loop testing for a condition. Your example assumes
> I know beforehand the number of times I need to invoke it, which
> generally won't be the case.
>
> But apparently I can use Input within such a loop, and I'll explore that
> possibility further.
Well, I went on to point out that perhaps you would like to use a
separate window - for example:
cntr = 0;
While[cntr < 3,
cntr++;
xx = 0;
DialogInput[Column[{InputField[Dynamic[xx]], DefaultButton[]}],
WindowTitle -> "Enter xx"];
]
This will create a popup box on each turn of the loop, and pause until
you respond and dismiss the box.
You can create a lot with these function that generate dynamic elements
and popup notebooks, etc., but I would be the first to agree that they
aren't very intuitive to use!
David Bailey
http://www.dbaileyconsultancy.co.uk
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread
can't get InputField to work inside a While command Dushan Mitrovich <dushanm@nnips.net> - 2013-05-14 07:14 +0000
Re: can't get InputField to work inside a While command David Bailey <dave@removedbailey.co.uk> - 2013-05-15 06:53 +0000
Re: can't get InputField to work inside a While command Dushan Mitrovich <dushanm@nnips.net> - 2013-05-17 08:34 +0000
Re: can't get InputField to work inside a While command David Bailey <dave@removedbailey.co.uk> - 2013-05-18 06:38 +0000
csiph-web