Modal Alert Panels?

Discussion in 'Mac Programming' started by satyam90, Oct 22, 2008.

  1. satyam90 macrumors regular

    satyam90

    Joined:
    Jul 30, 2007
    Location:
    Bangalore, India
    #1
    I am using Cocoa with Obj C on Mac OSX Tiger.
    I would like to have Modal alerts in my application. For that purpose I am using NSAlert and associated method beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo: to create alert dialogs.
    But by just declaring
    Code:
    NSAlert *alertDialog = [[[NSAlert alloc] init] autorelease];
    itself is giving the following error:
    Code:
    error: parse error before '*' token
    But I am able to use other alert sheets like NSRunAlertPanel, NSBeginAlertSheet etc.
    What might be the error in this case and what is the probable solution for this?
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    The only thing I can think of is NSAlert was new in 10.3 so if you're targeting 10.2 it won't be available.
     
  3. kpua macrumors 6502

    Joined:
    Jul 25, 2006

Share This Page