Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
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?
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.