• 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
Trouble with openFileWithoutUI
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trouble with openFileWithoutUI


  • Subject: Trouble with openFileWithoutUI
  • From: email@hidden
  • Date: Mon, 17 Nov 2008 16:44:44 +0000

I am trying to open a defined document type programmatically.  Document type is defined in info.plist and opens with UI just fine.
I can not get openFileWithoutUI to work. I have read documentation and I find no samples of code. There are several places I could be making an error but I can not see what I may be doing wrong.

1. I set an object: AppController as a delegate of my NSApplication in IB. In MainMenu.NIB if I click on AppController object I see File's Owner in the referencing outlet as a delegate.

2. I have a method in AppController:
- (BOOL)application:(id)sender openFileWithoutUI:(NSString *)filename
{
	return [self application:NSApp openFile:filename];
}
3: I call from another controller with the following:
NSApplication* app = [NSApplication sharedApplication];
[app application:self openFileWithoutUI: totalFile];

When this last statement is executed it does not call the AppController:: "application:(id)sender openFileWithoutUI:(NSString *)filename"  method.
in Console we get the error:
"-[NSApplication application:openFileWithoutUI:]: unrecognized selector sent to ..."

Probably be something wrong with my delegate set up. Any suggestions?
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Trouble with openFileWithoutUI
      • From: Keary Suska <email@hidden>
    • Re: Trouble with openFileWithoutUI
      • From: Fritz Anderson <email@hidden>
    • RE: Trouble with openFileWithoutUI
      • From: Etienne GuĂ©rard <email@hidden>
  • Prev by Date: Re: Remove '\n' char from NSString
  • Next by Date: Re: NSOutlineView setDoubleAction: working on 10.5, but not on 10.4.11
  • Previous by thread: Re: NSButtonCell slowdown in NSTableView
  • Next by thread: RE: Trouble with openFileWithoutUI
  • Index(es):
    • Date
    • Thread