• 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
NSOpenPanel weirdness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOpenPanel weirdness


  • Subject: NSOpenPanel weirdness
  • From: Stéphane Sudre <email@hidden>
  • Date: Wed, 7 Jan 2004 01:25:25 +0100

I'm getting some really weird behaviors with NSOpenPanel in an application I'm writing (Mac OS X 10.2 / ProjectBuilder):

It's a Multi-documents application.

I display the Open Panel with this code:

- (IBAction)addFiles:(id)sender
{
NSOpenPanel * tOpenPanel;
NSUserDefaults * tDefaults;

tDefaults=[NSUserDefaults standardUserDefaults];

[tDefaults setBool:YES forKey:@"AppleShowAllFiles"];

[tDefaults synchronize];

tOpenPanel=[NSOpenPanel openPanel];

[tOpenPanel setCanChooseFiles:YES];
[tOpenPanel setCanChooseDirectories:YES];
[tOpenPanel setAllowsMultipleSelection:YES];
[tOpenPanel setTreatsFilePackagesAsDirectories:YES];

[tOpenPanel setPrompt:NSLocalizedString(@"Add...",@"No comment")];

[tOpenPanel beginSheetForDirectory:nil
file:nil
types:nil
modalForWindow:[IBoutlineView_ window]
modalDelegate:self
didEndSelector:@selector(addFilesPanelDidEnd:returnCode:contextInfo:)
contextInfo:NULL];

[tDefaults setBool:NO forKey:@"AppleShowAllFiles"];

[tDefaults synchronize];
}

The strange behaviors are:

* When I scroll a Open Panel file browser column vertically, I have horizontal ghost lines in the column
* When I display the /Library content, the Contextual Menu Item line is displayed as if there was a \r before it and the same vertical offset appears in the PopupButton
* When I select the mach kernel file at /mach_kernel, I get this in the Run log:

*** -[NSFileManager fileSystemRepresentationWithPath:]: nil or empty path argument

I'm using the MOKit.framework which is doing some hacky thing with the NSView but since I haven't seen any issue with other widgets or UI part, I'm not sure it's related.

Has someone seen something like this?
_______________________________________________
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: NSOpenPanel weirdness
      • From: Mike Ferris <email@hidden>
  • Prev by Date: Re: Make iCal Reload Via AppleScript
  • Next by Date: Re: Changing the cell for a control
  • Previous by thread: Re: Make iCal Reload Via AppleScript
  • Next by thread: Re: NSOpenPanel weirdness
  • Index(es):
    • Date
    • Thread