answer with...

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

answer with...

J. Landman Gay via use-livecode
Hi
I have a blank...
I need to use a prompt in the form of
  answer "Your choice" with "John" or "Mary" or "Cancel"

the problem is that the number of options depends on the
result of a DB request, and can vary from 2 to 6...
I tried to put ("John" or "Mary" or "Cancel") in a string
but (answer "Your choice" with myString) doesn't work as
expected...
Any idea ?

Thanks in advance
jbv


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: answer with...

J. Landman Gay via use-livecode
This works:

onmouseUp

answer"your Choice" withfld "CHOIX"

endmouseUp


if fld "CHOIX" is a listField

Richmond.


On 8/16/17 10:07 pm, jbv via use-livecode wrote:

> Hi
> I have a blank...
> I need to use a prompt in the form of
>    answer "Your choice" with "John" or "Mary" or "Cancel"
>
> the problem is that the number of options depends on the
> result of a DB request, and can vary from 2 to 6...
> I tried to put ("John" or "Mary" or "Cancel") in a string
> but (answer "Your choice" with myString) doesn't work as
> expected...
> Any idea ?
>
> Thanks in advance
> jbv
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: answer with...

J. Landman Gay via use-livecode
In reply to this post by J. Landman Gay via use-livecode
http://forums.livecode.com/viewtopic.php?f=7&t=29638#p157100

Richmond.

On 8/16/17 10:07 pm, jbv via use-livecode wrote:

> Hi
> I have a blank...
> I need to use a prompt in the form of
>    answer "Your choice" with "John" or "Mary" or "Cancel"
>
> the problem is that the number of options depends on the
> result of a DB request, and can vary from 2 to 6...
> I tried to put ("John" or "Mary" or "Cancel") in a string
> but (answer "Your choice" with myString) doesn't work as
> expected...
> Any idea ?
>
> Thanks in advance
> jbv
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: answer with...

J. Landman Gay via use-livecode
In reply to this post by J. Landman Gay via use-livecode
Hi Richmond,

> Am 16.08.2017 um 21:32 schrieb Richmond Mathewson via use-livecode <[hidden email]>:
>
> This works:
>
> on mouseUp
>   answer"your Choice" with fld "CHOIX"
> end mouseUp
>
> if fld "CHOIX" is a listField

WOW, now THIS is really cool!
And also works with "normal" (editable) fields.

Really did not know this, thank you, Sir. :-)

> Richmond.
>
> On 8/16/17 10:07 pm, jbv via use-livecode wrote:
>> Hi
>> I have a blank...
>> I need to use a prompt in the form of
>>   answer "Your choice" with "John" or "Mary" or "Cancel"
>>
>> the problem is that the number of options depends on the
>> result of a DB request, and can vary from 2 to 6...
>> I tried to put ("John" or "Mary" or "Cancel") in a string
>> but (answer "Your choice" with myString) doesn't work as
>> expected...
>> Any idea ?
>>
>> Thanks in advance
>> jbv

Best

Klaus

--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: answer with...

J. Landman Gay via use-livecode
Ha, Ha! I didn't know that either until I had a "mad" idea and tried it.

Richmond.

On 8/16/17 10:54 pm, Klaus major-k via use-livecode wrote:

> Hi Richmond,
>
>> Am 16.08.2017 um 21:32 schrieb Richmond Mathewson via use-livecode <[hidden email]>:
>>
>> This works:
>>
>> on mouseUp
>>    answer"your Choice" with fld "CHOIX"
>> end mouseUp
>>
>> if fld "CHOIX" is a listField
> WOW, now THIS is really cool!
> And also works with "normal" (editable) fields.
>
> Really did not know this, thank you, Sir. :-)
>
>> Richmond.
>>
>> On 8/16/17 10:07 pm, jbv via use-livecode wrote:
>>> Hi
>>> I have a blank...
>>> I need to use a prompt in the form of
>>>    answer "Your choice" with "John" or "Mary" or "Cancel"
>>>
>>> the problem is that the number of options depends on the
>>> result of a DB request, and can vary from 2 to 6...
>>> I tried to put ("John" or "Mary" or "Cancel") in a string
>>> but (answer "Your choice" with myString) doesn't work as
>>> expected...
>>> Any idea ?
>>>
>>> Thanks in advance
>>> jbv
> Best
>
> Klaus
>
> --
> Klaus Major
> http://www.major-k.de
> [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: answer with...

J. Landman Gay via use-livecode
Thanks!
This is cool!
I appreciate it when people contribute code snippets.
I would have never thought of this.

Sincerely,

Clarence Martin
Email: [hidden email]
Cell: 626 6965561

-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf
Of Richmond Mathewson via use-livecode
Sent: Wednesday, August 16, 2017 12:56 PM
To: How to use LiveCode <[hidden email]>
Cc: Richmond Mathewson <[hidden email]>
Subject: Re: answer with...

Ha, Ha! I didn't know that either until I had a "mad" idea and tried it.

Richmond.

On 8/16/17 10:54 pm, Klaus major-k via use-livecode wrote:
> Hi Richmond,
>
>> Am 16.08.2017 um 21:32 schrieb Richmond Mathewson via use-livecode
<[hidden email]>:

>>
>> This works:
>>
>> on mouseUp
>>    answer"your Choice" with fld "CHOIX"
>> end mouseUp
>>
>> if fld "CHOIX" is a listField
> WOW, now THIS is really cool!
> And also works with "normal" (editable) fields.
>
> Really did not know this, thank you, Sir. :-)
>
>> Richmond.
>>
>> On 8/16/17 10:07 pm, jbv via use-livecode wrote:
>>> Hi
>>> I have a blank...
>>> I need to use a prompt in the form of
>>>    answer "Your choice" with "John" or "Mary" or "Cancel"
>>>
>>> the problem is that the number of options depends on the result of a
>>> DB request, and can vary from 2 to 6...
>>> I tried to put ("John" or "Mary" or "Cancel") in a string but
>>> (answer "Your choice" with myString) doesn't work as expected...
>>> Any idea ?
>>>
>>> Thanks in advance
>>> jbv
> Best
>
> Klaus
>
> --
> Klaus Major
> http://www.major-k.de
> [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: answer with...

J. Landman Gay via use-livecode
In reply to this post by J. Landman Gay via use-livecode
Richmond Mathewson wrote:

 > This works:
 >
 > on mouseUp
 >   answer "your Choice" with fld "CHOIX"
 > end mouseUp

Apparently that works with any return-delimited container, including
variables.

I couldn't find mention of this in the Dictionary entry for "answer".
Any know offhand if there's a bug report for that?

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: answer with...

J. Landman Gay via use-livecode
Android Mobile is limited to 3.

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: answer with...

J. Landman Gay via use-livecode
In reply to this post by J. Landman Gay via use-livecode
On 8/16/17 10:07 pm, jbv via use-livecode wrote:

 > I have a blank...
 > I need to use a prompt in the form of
 >    answer "Your choice" with "John" or "Mary" or "Cancel"
 >
 > the problem is that the number of options depends on the
 > result of a DB request, and can vary from 2 to 6...

I think the answer command has always accepted CR instead of "or" if I
remember right. At any rate, if you don't want to use a field, you can
just replace the commas with CR and use that.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: answer with...

J. Landman Gay via use-livecode
works like a charm...

Thanks a lot.


On Wed, August 16, 2017 10:13 pm, J. Landman Gay via use-livecode wrote:

> On 8/16/17 10:07 pm, jbv via use-livecode wrote:
>
>
>> I have a blank...
>> I need to use a prompt in the form of
>> answer "Your choice" with "John" or "Mary" or "Cancel"
>>
>> the problem is that the number of options depends on the result of a DB
>> request, and can vary from 2 to 6...
>
> I think the answer command has always accepted CR instead of "or" if I
> remember right. At any rate, if you don't want to use a field, you can just
> replace the commas with CR and use that.
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
>
>
> _______________________________________________
> use-livecode mailing list [hidden email] Please visit this
> url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: answer with...

J. Landman Gay via use-livecode
In reply to this post by J. Landman Gay via use-livecode
On Wed, Aug 16, 2017 at 12:07 PM, jbv via use-livecode <
[hidden email]> wrote:

> Hi
> I have a blank...
> I need to use a prompt in the form of
>   answer "Your choice" with "John" or "Mary" or "Cancel"
>
> the problem is that the number of options depends on the
> result of a DB request, and can vary from 2 to 6...
>

put "answer " & quote & "Your  Choice" &quote & " with" into myCmd
repeat for each word who in theLIst

put who & " or " after myCmd

end repeat

delete char -4 to -1 of yCmd
do myCmd


--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode