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: Kevin Vanwulpen <email@hidden>
- Date: Thu, 19 Jul 2007 17:22:18 -0700
Hi ,
- if I have my app running (normal or in debugger) and double click the
file, it will open
so I guess my problem should be restated to "My app does not launch"
- I put some debug statements in the mentioned application:openFile
method, in my awakeFromNib, I even put one at the start of main (printf
in that case) ...none of them result in any Console.app messages
On a sidenote but potentially related note, the file actually is an XML
file, our file extension is .mst
open test.mst
I get:
2007-07-19 14:42:04.488 open[2125] LSOpenFromURLSpec() returned -10814
for application (null) urls file://localhost/Users/kevin/Desktop/test1.mst
Kevin
thank you for the feedback
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
_______________________________________________
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