Professional Web Applications Themes

StandardAlert - Mac Programming

Hello 1) I am trying the StandardAlert with code below but i only get a OK button. how to get a cancel and ok button?? err = StandardAlert( kAlertCautionAlert, errorMessage, descriptionMessage, NULL, &itemHit ); 2) I trying SetDialogDefaultItem on a CNTL but it does not seem to be able to act on Enter/Return Key. But it i set to a Button, it will work...... Is there any workaround? thanks! -- Best Regards Eleen...

  1. #1

    Default StandardAlert

    Hello

    1) I am trying the StandardAlert with code below
    but i only get a OK button. how to get a cancel and ok button??
    err = StandardAlert( kAlertCautionAlert, errorMessage, descriptionMessage,
    NULL, &itemHit );

    2) I trying SetDialogDefaultItem on a CNTL but it does not seem to be able
    to
    act on Enter/Return Key. But it i set to a Button, it will work......
    Is there any workaround?

    thanks!

    --
    Best Regards
    Eleen


    neele Guest

  2. #2

    Default Re: StandardAlert

    In article <brb91h$nod$singnet.com.sg>, "neele" <com>
    wrote:
     

    Set the appropriate options in your AlertStdAlertParamRec, and pass it in the
    4th argument. The doentation in Dialogs.h is reasonable.

    hth

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  3. #3

    Default Re: StandardAlert

    Hello..

    ok thanks for the reply.
    I too found out how to use the AlertStdAlertParamRec
    previously i did not know how to make use of it.

    But now another issue is. I want if click OK , close the dialog box
    if cancel just close alert and back to dialog

    But it seem BOTH ok or cancel will close my dialog. any suggestions
    thanks !

    --
    Best Regards
    Eleen
    "Miro Jurisic" <org> wrote in message
    news:mit.edu... 
    <com> [/ref]
    descriptionMessage, 
    >
    > Set the appropriate options in your AlertStdAlertParamRec, and pass it in[/ref]
    the 


    neele Guest

  4. #4

    Default Re: StandardAlert

    In article <brbni8$oh1$singnet.com.sg>, "neele" <com>
    wrote:
     

    I am confused about what is going on here. Can you describe what the dialog and
    the alert are doing in more details.

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  5. #5

    Default Re: StandardAlert

    Oh ok

    In an application, i open a Dialog Box (for user to do some stuff)
    And on the Dialog Box there is a Cancel Button.
    When user click cancel, i show an Alert box asking
    they sure to quit or not to quit?

    So if they clicked ok on the alert, I close the Dialog Box
    but the application should still remained launched..

    If they clicked cancel, it only suppose to close the alert and
    back to the dialog box.of course the application remain as well.

    Is that clearer?...

    But now it seem. When i use disposedialog, it CLOSES the
    whole application instead. So i guess i did not handle the ok and cancel
    button well.

    Thanks. Any suggestions...

    --
    Best Regards
    Eleen
    "Miro Jurisic" <org> wrote in message
    news:mit.edu... 
    <com> 
    >
    > I am confused about what is going on here. Can you describe what the[/ref]
    dialog and 


    neele Guest

  6. #6

    Default Re: StandardAlert

    On Fri, 12 Dec 2003, neele wrote:
     

    Just closing a dialog will not kill your application, unless your
    application is written that way. Try stepping through your app with a
    debugger.

    Fred

    Frederick Guest

  7. #7

    Default Re: StandardAlert

    In article <brbpoi$okj$singnet.com.sg>,
    "neele" <com> wrote:
     

    Hi,

    you *are* aware that it is extremely bad User Interface to have a
    dialog on top of another dialog. You may want to rethink your user
    interface before you find that your app's been listed on
    http://www.perversionTracker.com or other very critical sites...
     

    It shouldn't close the application in that case. Is your application
    crashing, perhaps? Run it in the debugger; does it say anything about
    BAD_ACCESS or SIG_BUS or something like that? That would indicate that
    you have a coding error (disposing of memory you didn't allocate,
    passing a number that wasn't a pointer to a function that uses it as a
    pointer or the likes).

    You may especially look at any warnings the compiler gives you, those
    usually indicate mistakes in your coding. Especially if you find
    yourself type-casting from one data type to another, you are very likely
    fixing your baby's screaming by putting a band-aid on its mouth, if you
    excuse my metaphor.

    If you can't find the mistake that way, I'd suggest you post some more
    of your code. In particular, how you are creating/storing/accessing the
    dialog pointer and how the call to DisposeDialog() looks, how you're
    declaring your AlertStdParamRec (or whatever the name was again), how
    you're filling it out and how you're passing it to StandardAlert().

    Cheers,
    -- M. Uli Kusterer
    http://www.zathras.de
    Uli Guest

  8. #8

    Default Re: StandardAlert

    In article <t-online.com>,
    Uli Kusterer <de> wrote:
     
    >
    > Hi,
    >
    > you *are* aware that it is extremely bad User Interface to have a
    > dialog on top of another dialog. You may want to rethink your user
    > interface before you find that your app's been listed on
    > http://www.perversionTracker.com or other very critical sites...[/ref]

    An alert on top of a dialog - because what you've just asked the dialog
    to do has the possibility of really hosing you - is a long-standing
    exception to the disouragement of stacked modals.

    On the other hand, the particular interaction the OP is describing
    sounds like it might need some rethinking. Confirming the Cancel button
    is not usually something that springs to mind as worthwhile.

    G
    Gregory Guest

  9. #9

    Default Re: StandardAlert

    Thanks for all the reply.

    I think i found the ISSUE but yet to clear it.
    There is one part of the code checking for 1 and 2 (ok and cancel buttons)
    of my Dialog . Thus sort of clashes with the Alert box (ok and cancel) as
    it also is item 1 and 2...;c

    will have to change the code..somehow..
    Thanks !

    --
    Best Regards
    Eleen
    "Frederick Cheung" <DUH.ucam.org> wrote in message
    news:srcf.societies.cam.ac.uk... 
    >
    > Just closing a dialog will not kill your application, unless your
    > application is written that way. Try stepping through your app with a
    > debugger.
    >
    > Fred
    >[/ref]


    neele Guest

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139