• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[Q] SavePanel NSFileHandlingPanelCancelButton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Q] SavePanel NSFileHandlingPanelCancelButton


  • Subject: [Q] SavePanel NSFileHandlingPanelCancelButton
  • From: Mark de Jong <email@hidden>
  • Date: Fri, 14 Jun 2002 19:16:07 -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. 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.

  • Prev by Date: Enabling run-time-created submenus
  • Next by Date: Custom Open/Save Directory Tree
  • Previous by thread: Enabling run-time-created submenus
  • Next by thread: [Q] SavePanel NSFileHandlingPanelCancelButton
  • Index(es):
    • Date
    • Thread