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

Re: NSOpenPanel weirdness


  • Subject: Re: NSOpenPanel weirdness
  • From: Mike Ferris <email@hidden>
  • Date: Wed, 7 Jan 2004 13:20:53 -0800

There's a compile-time macro and/or a runtime user default you can set
in MOKit to disable the funky stuff it is doing... Try running your
code with the user default MOKitAllowsMethodReplacement set to "NO".
This should at least help to definitely eliminate MOKit from the
potential causes of your problems.

Mike Ferris


Begin forwarded message:

> From: Stiphane Sudre <email@hidden>
> Date: January 6, 2004 4:25:25 PM PST
> To: email@hidden
> Subject: NSOpenPanel weirdness
>
> 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.
_______________________________________________
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:
    • [SOLVED] Re: NSOpenPanel weirdness
      • From: Stéphane Sudre <email@hidden>
    • Re: NSOpenPanel weirdness
      • From: Stéphane Sudre <email@hidden>
References: 
 >NSOpenPanel weirdness (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: disableKeyEquivalentForDefaultButtonCell broken?
  • Next by Date: Re: Message.framework bugs?
  • Previous by thread: NSOpenPanel weirdness
  • Next by thread: Re: NSOpenPanel weirdness
  • Index(es):
    • Date
    • Thread