Ask interface with pulldown

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
AlessioForconi
Posts: 90
Joined: Sun Feb 15, 2015 2:51 pm

Ask interface with pulldown

Post by AlessioForconi » Wed Mar 27, 2019 9:32 am

Hello everyone,

I was wondering if there is a way to have an ask interface with a pulldown menu, so as to provide a choice between predefined answers, or if you have to create it yourself.

Thank you

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Ask interface with pulldown

Post by Klaus » Wed Mar 27, 2019 10:50 am

Buongiorno Alessio,

not build-in, but the ASK and ANSWER dialogs are just MODAL stacks, so roll your own! :-)
Also check "dialogdata" in the dictionary.

Best

Klaus

AlessioForconi
Posts: 90
Joined: Sun Feb 15, 2015 2:51 pm

Re: Ask interface with pulldown

Post by AlessioForconi » Wed Mar 27, 2019 11:07 am

Tanks Klaus :D

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9663
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Ask interface with pulldown

Post by dunbarx » Wed Mar 27, 2019 3:13 pm

Hi.

What Klaus said.

It is common practice, especially with, say, order entry forms or the like, to create a small stack that can be opened and closed as needed. The nice thing about them is that you can have buttons, fields, images, whatever, on the card, and customize to your needs. And you can modify them later.

The ask and answer dialogs have very limited functionality. Their advantage is they are "native" and very easy to use.

But as Klaus said, there is really no difference between them, it is just that you have to author your own. But you only need do that once.

Craig Newman

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Ask interface with pulldown

Post by jmburnod » Wed Mar 27, 2019 3:35 pm

Hi All,
Sometimes i use a group to simulate a complex ask/answer dialog.
Best
Jean-Marc
https://alternatic.ch

AlessioForconi
Posts: 90
Joined: Sun Feb 15, 2015 2:51 pm

Re: Ask interface with pulldown

Post by AlessioForconi » Tue Apr 02, 2019 7:02 pm

jmburnod wrote:
Wed Mar 27, 2019 3:35 pm
Hi All,
Sometimes i use a group to simulate a complex ask/answer dialog.
Best
Jean-Marc
Interesting, can you give me an example?

Thanks

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9663
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Ask interface with pulldown

Post by dunbarx » Tue Apr 02, 2019 9:50 pm

Whether or not you use a group, the point is that you are using another actual stack that will float over your working stack. On that stack you can place anything at all. You call it just like the native ask/answer dialogs, and dismiss it when you are done.

There is a wrinkle. A native "answer" dialog, say, places the choice you make into the "it" variable, which you then process right inside the stack you used to call it. But in the fancy stack, you must explicitly send the new information to the working stack.

Otherwise, there is no difference at all.

Craig

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Ask interface with pulldown

Post by jmburnod » Tue Apr 02, 2019 10:42 pm

Hi Alessio
What Craig said
The user must select a choice and he can't click a control outside the dialog is the particularity of a dialog as ask/answer.
You can simulate this with a grc with a 50 blendlevel which trap mousemessages.
Best
Jean-Marc
https://alternatic.ch

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Ask interface with pulldown

Post by jmburnod » Mon Apr 15, 2019 2:03 pm

Hi Alessio
Interesting, can you give me an example?
Here is one.
GroupAsDialog.png
Best regards
Jean-Marc
https://alternatic.ch

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Ask interface with pulldown

Post by jmburnod » Tue Apr 16, 2019 9:56 am

Craig said,
Otherwise, there is no difference at all
Yes for code, but I found one difference for an ios version which is limited to one window.
I think that is easier to simulate dialog with a group than use a custom stack.
Jean-Marc
https://alternatic.ch

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”