[Q] SavePanel NSFileHandlingPanelCancelButton
[Q] SavePanel NSFileHandlingPanelCancelButton
- Subject: [Q] SavePanel NSFileHandlingPanelCancelButton
- From: Mark de Jong <email@hidden>
- Date: Sat, 15 Jun 2002 23:52:27 -0700
Hi!
I'm trying to change the title of the cancel button in the NSSavePanel.
According to the documentation, I should be able to use the constant
"NSFileHandlingPanelCancelButton" to get at the NSButton.
From what I understand, the following code should work:
NSSavePanel *panel = [NSSavePanel savePanel];
[panel setPrompt:@"Save my stuff"];
[panel setTitle:@"Save my stuff"];
[panel setDelegate:self];
cancelButton = [[panel contentView]
viewWithTag:NSFileHandlingPanelCancelButton];
[cancelButton setTitle:@"Quit"];
But it does not work, which probably means I don't understand
correctly. :-) I get the following result:
2002-06-14 19:14:10.342 TestApp[2073] *** -[NSScroller setTitle:]:
selector not recognized
2002-06-14 19:14:10.344 TestApp[2073] An uncaught exception was
raised
2002-06-14 19:14:10.346 TestApp[2073] *** -[NSScroller setTitle:]:
selector not recognized
2002-06-14 19:14:10.376 TestApp[2073] NSExceptionHandler has
recorded the following exception:
NSInvalidArgumentException -- *** -[NSScroller setTitle:]:
selector not recognized
Stack trace: 0x708c6628 0x71651fd4 0x708788b8 0x70852a50
0x708529ac 0x7088be24 0x708204a4 0x706bb250
0x0000a8e8 0x00009398 0x708a0170 0x70c17790 0x70c63830
0x70c1f050 0x70c69a98 0x70c5e014 0x70c91e74
0x00004440 0x00004270
So, the question is: how do I correctly change the title of the cancel
button?
Thanks!
-- Mark
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.