ASK dialog box

Peter M. Brigham pmbrig at gmail.com
Wed Nov 25 12:35:34 EST 2015


If something is entered and the field contains text and the user clicked "OK" then
    it = <text entered> and the result = empty
if user enters text then clicks "cancel" then
    it = empty and the result = "cancel"
if user doesn't enter text and the field is empty and then clicks "OK" then
    it = empty and the result = empty
if user doesn't enter text and then clicks "cancel" then
    it = empty and the result = "cancel"

-- Peter

Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig


On Nov 25, 2015, at 12:17 PM, Randy Hengst wrote:

> Hi Klauss,
> 
> Yes, I did find that Cancel put EMPTY into it.
> 
> The catch is, so does selecting OK when the user leaves the dialog empty.
> 
> I’d like to respond in different ways depending on the user selecting Cancel versus OK.
> 
> I can’t find a way to trap for which button is pressed since in both cases it seems that EMPTY is placed in “it”
> 
> Thoughts?
> 
> be well,
> randy
> 
> Randy Hengst
> www.classroomFocusedSoftware.com
> 
> 
>> On Nov 24, 2015, at 11:47 AM, Klaus major-k <klaus at major-k.de> wrote:
>> 
>> Hi Randy,
>> 
>>> Am 24.11.2015 um 18:44 schrieb Randy Hengst <iowahengst at mac.com>:
>>> 
>>> Hi All,
>>> 
>>> I’ve include an ASK command in a new app. 
>>> 
>>> It was my understanding (though I don’t see this in the dictionary) that “Cancel” is placed in the “it” variable when the user selects “Cancel."
>>> However, the “it” variable seems to be empty… which is the same way “it” appears when no information is entered into the ASK dialog box and “OK” is pressed.
>>> I’d like to do one thing when the user “Cancels” and another when the user simply leaves the dialog blank, but presses OK.
>>> Is there a way to discern between an “OK” with no information added and a “Cancel”?
>> 
>> If the user hits „Cancel":
>> IT = EMPTY
>> the result = Cancel
>> :-)
>> 
>>> be well,
>>> randy
>>> 
>>> Randy Hengst
>>> www.classroomFocusedSoftware.com
>> 
>> Best
>> 
>> Klaus
>> 
>> --
>> Klaus Major
>> http://www.major-k.de
>> klaus at major-k.de
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list