• 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: Sample Cocoa code to show how to launch a doc by sliding its icon into appl icon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sample Cocoa code to show how to launch a doc by sliding its icon into appl icon


  • Subject: Re: Sample Cocoa code to show how to launch a doc by sliding its icon into appl icon
  • From: Fritz Anderson <email@hidden>
  • Date: Fri, 8 Jul 2005 11:27:28 -0500

On 7 Jul 2005, at 3:58 PM, Frederick C. Lee wrote:

I've solved my original error:

@implementation ParseWindowController (_private)

- (BOOL)application:NSApp openFile:(NSString *)filename {
    NSLog(@"{openFile}  Hello Ric!");
    return TRUE;
}

...via using 'NSApp' as my application.    Make Sense.

So I don't have a runtime error.

Um, wait. What exactly do you think you are accomplishing by replacing the (NSApplication *) anApp specifier for the parameter with an untyped (and therefore id-typed) stack variable that masks out the NSApp global variable? Other than making the global inaccessible inside the method, I don't believe it has any effect at all on the generated binary. This is not like Dylan, where you can specify a method implementation for a singleton value of a parameter.


Is the class to which you added this method the application's delegate? Is the file you are dragging in of a type you've identified in your Info.plist as one you can read or edit?

You say you "got" a runtime error. Under what circumstances? Were you dragging in a file, or just starting the application? The error messages talk about trying to register a "ServiceProvider." Does your application include a Mac OS X service?

    -- F

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Sample Cocoa code to show how to launch a doc by sliding its icon into appl icon (From: "Frederick C. Lee" <email@hidden>)
 >Re: Sample Cocoa code to show how to launch a doc by sliding its icon into appl icon (From: "Shoaib" <email@hidden>)
 >Re: Sample Cocoa code to show how to launch a doc by sliding its icon into appl icon (From: "Frederick C. Lee" <email@hidden>)

  • Prev by Date: Re: NO future for Cocoa-Java ?
  • Next by Date: Re: can't make an NSButton small enough
  • Previous by thread: Re: Sample Cocoa code to show how to launch a doc by sliding its icon into appl icon
  • Next by thread: Visiblity
  • Index(es):
    • Date
    • Thread