Re: can't get InputField to work inside a While command
- To: mathgroup at smc.vnet.net
- Subject: [mg130820] Re: can't get InputField to work inside a While command
- From: David Bailey <dave at removedbailey.co.uk>
- Date: Sat, 18 May 2013 02:40:26 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-outx@smc.vnet.net
- Delivered-to: mathgroup-newsendx@smc.vnet.net
- References: <kmso9j$h67$1@smc.vnet.net> <kmvbdl$nok$1@smc.vnet.net> <kn4q33$2b5$1@smc.vnet.net>
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