Re: application:openFile: usage
Re: application:openFile: usage
- Subject: Re: application:openFile: usage
- From: marquis logan <email@hidden>
- Date: Tue, 19 Oct 2004 22:57:25 -0400
sure you can use a boolean:
Sent directly by theApplication to the delegate. The method should open the file filename, returning <x-tad-smaller>YES</x-tad-smaller>
if the file is successfully opened, and <x-tad-smaller>NO</x-tad-smaller>
otherwise. If the user started up the application by double-clicking a file, the delegate receives the <x-tad-smaller>application:openFile:</x-tad-smaller>
message before receiving <x-tad-smaller>applicationDidFinishLaunching:</x-tad-smaller>. (<x-tad-smaller>applicationWillFinishLaunching:</x-tad-smaller> is sent before<x-tad-smaller>application:openFile:</x-tad-smaller>
.)
you can exploit that fact to reflect that your app was launched by the openFile:
nibs
On Oct 19, 2004, at 10:49 PM, Dennis Falling wrote:
Yeah, that was my thought, but I don't know how to see which launch type was used. I can't just set a boolean in that method, because that same method will be called whether the application is already open or not.
-dennis
On Oct 19, 2004, at 9:42 PM, Dennis Falling wrote:
Yeah, that was my thought, but I don't know how to see which launch type was used. I can't just set a boolean in that method, because that same method will be called whether the application is already open or not.
-dennis
On Oct 19, 2004, at 9:32 PM, Daniel Todd Currie wrote:
I'm not sure I understand the difference exactly, but could you perhaps use a BOOL instance variable to store which launch type was used? Then in the -applicationShouldTerminate: delegate method, you can refer to the BOOL and quit or not, depending on the BOOL's value.
-- DTC
On 2004 Oct 20, at 10:22, Dennis Falling wrote:
How can I get my application to quit if the call to application:openFile: launched it, but not if it was launched normally and then this method was used?
Thanks,
-dennis falling
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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