• 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
Re: Trouble with a save panel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble with a save panel


  • Subject: Re: Trouble with a save panel
  • From: Sherm Pendley <email@hidden>
  • Date: Sun, 16 Mar 2003 08:16:18 -0500

On Saturday, March 15, 2003, at 07:09 PM, David Wood wrote:

The save panel itself doesn't seem to respond correctly to mouse clicks, clicking either Cancel or Save buttons accomplishes nothing, and it doesn't even show all of the files and folders in the Browser; it just shows those referenced, even when you click elsewhere. In fact, it's run as a sheet:

- (IBAction)savePDF:(id)sender
{
NSSavePanel *panel = [NSSavePanel savePanel];
[panel setRequiredFileType:@"pdf"];
[panel beginSheetForDirectory:nil
file:nil
modalForWindow: [self window]
modalDelegate:self
didEndSelector:@selector(didEnd:returnCode:contextInfo:)
contextInfo:nil];
}

..and it shows on the screen like a regular dialog box, separate from the program's main window.

It sounds like a silly question, but is "self" what you think it is? Could it be getting autoreleased, perhaps, and the memory re-used for another object?

The docs for NSSavePanel indicate that, if the modalForWindow: parameter is nil, the resulting panel is displayed as a dialog, not a sheet. Also, if nil is passed to the modalDelegate: parameter, or if the object passed as the delegate doesn't have the named didEndSelector:, that would cause the resulting didEnd: selector to never get called.

sherm--

If you listen to a UNIX shell, can you hear the C?
_______________________________________________
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.

  • Follow-Ups:
    • Re: Trouble with a save panel
      • From: David Wood <email@hidden>
References: 
 >Trouble with a save panel (From: David Wood <email@hidden>)

  • Prev by Date: Re: NSString array to -> char**
  • Next by Date: Re: Retain counts with a dictionary
  • Previous by thread: Fun with File/Directory Owners
  • Next by thread: Re: Trouble with a save panel
  • Index(es):
    • Date
    • Thread