emulating the ask dialog

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 244
Joined: Wed May 11, 2011 7:50 pm
Location: Southern California

emulating the ask dialog

Post by chipsm » Tue Mar 14, 2017 5:49 am

I have several fields that I would like to input data into. These fields are contained in a group. I have a repeat loop that cycles through each field in the group and I am now interrupting the repeat by using an "Ask dialog". My repeat loop identifies the fields by name so I can focus into each field but the only way to pause the repeat is with the "Ask Dialog"
I am looking for a substitute method (script) that would emulate the "Ask DIalog" by pausing the repeat at the field and allow me to enter or edit the data in the filed and then continue to the next field and then the next and so forth.
Any suggestions?
Clarence Martin
chipsm@themartinz.com

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK
Contact:

Re: emulating the ask dialog

Post by dave.kilroy » Tue Mar 14, 2017 1:28 pm

Clarence it sounds like a substack set up as a modal dialog should be able to give you the functionality you're looking for - http://lessons.livecode.com/m/4071/l/11 ... dal-dialog

Dave
"...this is not the code you are looking for..."

chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 244
Joined: Wed May 11, 2011 7:50 pm
Location: Southern California

Re: emulating the ask dialog

Post by chipsm » Tue Mar 14, 2017 1:35 pm

Thanks.
Yes and I have been trying to avoid that. I want this to work seamlessly in mobile as well and I don't want to use a substack in the Mobile version.
I don't know if I can have it both ways.
I may have to concede to a substack.
Clarence Martin
chipsm@themartinz.com

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK
Contact:

Re: emulating the ask dialog

Post by dave.kilroy » Tue Mar 14, 2017 1:38 pm

OK well why not fake a modal substack by using a group that 'floats' over the rest of your gui? But of course if you use native controls in your mobile version that would make this approach tricky...
"...this is not the code you are looking for..."

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK
Contact:

Re: emulating the ask dialog

Post by dave.kilroy » Tue Mar 14, 2017 1:40 pm

Also, you certainly CAN have it both ways - one approach in your desktop version and a different approach in your mobile one (use the environment function/property)
"...this is not the code you are looking for..."

chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 244
Joined: Wed May 11, 2011 7:50 pm
Location: Southern California

Re: emulating the ask dialog

Post by chipsm » Tue Mar 14, 2017 2:50 pm

Thanks again.
Lots of "Food for thought".
Clarence Martin
chipsm@themartinz.com

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9823
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: emulating the ask dialog

Post by FourthWorld » Tue Mar 14, 2017 3:04 pm

The Ask dialog is available on mobile, no?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 244
Joined: Wed May 11, 2011 7:50 pm
Location: Southern California

Re: emulating the ask dialog

Post by chipsm » Tue Mar 14, 2017 4:31 pm

Yes, both the ask and answer dialog boxes, as far as I know.
The problem that I am trying to avoid is: I have multi-line table list fields that need to be editable also.
The ask dialog makes this hard to do.
Clarence Martin
chipsm@themartinz.com

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9823
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: emulating the ask dialog

Post by FourthWorld » Tue Mar 14, 2017 5:08 pm

One way to get the modal behavior you want without a modal dialog would be to break your loop into two handlers, one which sets up and displays a group, and the other triggered by the OK button in your group.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 244
Joined: Wed May 11, 2011 7:50 pm
Location: Southern California

Re: emulating the ask dialog

Post by chipsm » Tue Mar 14, 2017 5:26 pm

Cool, I'll give it a try.
Clarence Martin
chipsm@themartinz.com

Post Reply

Return to “Talking LiveCode”