• 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
Help! Open File always returns YES
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help! Open File always returns YES


  • Subject: Help! Open File always returns YES
  • From: John McGruer <email@hidden>
  • Date: Fri, 15 Mar 2002 22:40:01 +0800

I want to open a help file and need to check that the file was successfully
opened. I'm using:

result = [[NSWorkspace sharedWorkspace] openFile:helpFilePath_1
withApplication:@"Preview"];

The problem is that "result" is always YES even though the help file does
not exist yet! shouldn't "result = NO if the file does not exist? How to get
around this problem? Many thanks

PS If I use this form:

result = [[NSWorkspace sharedWorkspace] openFile:helpFilePath_2];

"result" still = YES but Internet Explorer is launched, even though
helpFilePath_2 is a .pdf file!! What gives?
_______________________________________________
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: Help! Open File always returns YES
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Subclass NSCell
  • Next by Date: What may be wrong?
  • Previous by thread: Re: Subclass NSCell
  • Next by thread: Re: Help! Open File always returns YES
  • Index(es):
    • Date
    • Thread