Re: Finder Open file versus double-clicking file
Re: Finder Open file versus double-clicking file
- Subject: Re: Finder Open file versus double-clicking file
- From: "Marcus S. Zarra" <email@hidden>
- Date: Thu, 19 Jul 2007 13:08:42 -0600
On Jul 19, 2007, at 12:24 PM, Kevin Vanwulpen wrote:
Hi
My application has it's own file type and extensions and whatnot.
a) If in Finder I select my file , right click and from the menu
select Open With it shows as expected "myApp(default)"
if I click on this, as desired my app opens with the file requested.
My NSApplication delegate implements
- (BOOL)application:(NSApplication *)theApplication openFile:
(NSString *)filename
to handle this and in the above case this does get called as expected.
b) When I double-click on the file though from the Finder I briefly
see the visual effect of the icon 'enlarging' and then it closes
again. The application does not start (as far as I can determine at
least) , there are no crash logs or crash reports.
In fact if the application were to crash right away I'd expect the
same visual effect to occur but with as difference that the crash
report window would then come up. If I use the Finder right-click
menu and use Open rather than Open With things work perfectly as
well. I wonder why Open With sees the default (correct) application
to use for hte filetype, I would have expected Open to pretty much
be the same as "Open With default application".
c) It does not seem consistent across machines (same model of Mac,
Mac Pro's in this case) but on 1 machine if we delete the
applications preferences file for my app (in ~/Library/Preferences)
and then restart double-clicking the file works once...and only
once. Is there some entry in the plist file that is ussualy stored
related to this I am unaware of?
Does anyone have any ideas as to what may be going on here?
Some steps to try:
1. Run your app in debug with a break point in the -
application:openFile: method. Then double click the file and observe
the results.
2. Put some debug statements in that method, compile and double
click. Observe the results in Console.app
That should at least tell you if it is hitting your application at all.
Marcus S. Zarra
Zarra Studios LLC
Simply Elegant Software for OS X
www.zarrastudios.com
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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