Hi,
I'm sure someone will answer this in minutes
I want to put the contents of an NSAlert accessory view into an NSString but don't know the correct syntax. Here's a broken down example of what I have:
Thanks in advance!
I'm sure someone will answer this in minutes
I want to put the contents of an NSAlert accessory view into an NSString but don't know the correct syntax. Here's a broken down example of what I have:
Code:
NSTextView *accessory = [[NSTextView alloc] initWithFrame:NSMakeRect(0,0,200,40)];
[accessory insertText:[[NSAttributedString alloc] init]];
[accessory setEditable:YES];
[accessory setDrawsBackground:YES];
NSAlert *alert = [[[NSAlert alloc] init] autorelease];
[alert setAccessoryView:accessory];
[alert addButtonWithTitle:NSLocalizedString(@"OK", nil)];
NSInteger choice = [alert runModal];
// get accessory view as string here!!
Thanks in advance!