Re: Sample Cocoa code to show how to launch a doc by sliding its icon into appl icon
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