I have several NSAlert dialogs with different text. I want to adjust the alert window width to the text, so that the text don\'t wrap. Therefore I use this code to calculate
An NSAlert can be widened by adding an accessory view of sufficient width:
NSAlert *alert = [[[NSAlert alloc] init] autorelease]; alert.accessoryView = [[[NSView alloc] initWithFrame:NSMakeRect(0, 0, 500, 0)] autorelease];