FROM : Phil
DATE : Thu Feb 07 21:31:41 2008
I could be mistaken but I don't think there's a good mechanism to do
this. You should probably file a bug against the Finder for allowing
the user to do this without at least warning them that they should
quit the application before moving/renaming it (but even this would
still only be a partial solution: what if the user renamed a directory
in the path to the executable or moved their apps directory somewhere
else while running?) It seems like it would be a significant amount
of effort, both in the Apple frameworks and for app developers, to
keep a non-trivial application functioning properly to being moved/
renamed while running vs. what percentage of users would ever attempt
to do this even once.
Phil
On Feb 7, 2008, at 2:50 PM, Sanford Selznick wrote:
> Hello,
>
> A while ago I submitted a bug report to Apple that my app broke
> when the user moved it around in the Finder while it was running. I
> was told by Apple to "use the bundle APIs correctly". So, now 5
> years later, I'm looking in to it.
>
> I have a very simple Cocoa app with a window in a nib with a static
> PNG in the window (inside an NSImageView).
>
> I create the window with:
>
> [[NibClass alloc] initWithWindowNibName: @"NibName"];
>
> When I move the app while it's running, and create the window
> again, Cocoa is all confused and can't find the image referenced by
> the Nib. And not just images, it can't find localized strings and
> other important doodads in the App bundle.
>
> So, what's the proper way to handle this so I can "use the bundle
> APIs correctly"? Is there some way to inform Cocoa that my app has
> moved?
>
> Thanks,
> Sanford
>
> PS - The 10.5.1 Finder did not warn me when I moved my app while it
> was running.
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
DATE : Thu Feb 07 21:31:41 2008
I could be mistaken but I don't think there's a good mechanism to do
this. You should probably file a bug against the Finder for allowing
the user to do this without at least warning them that they should
quit the application before moving/renaming it (but even this would
still only be a partial solution: what if the user renamed a directory
in the path to the executable or moved their apps directory somewhere
else while running?) It seems like it would be a significant amount
of effort, both in the Apple frameworks and for app developers, to
keep a non-trivial application functioning properly to being moved/
renamed while running vs. what percentage of users would ever attempt
to do this even once.
Phil
On Feb 7, 2008, at 2:50 PM, Sanford Selznick wrote:
> Hello,
>
> A while ago I submitted a bug report to Apple that my app broke
> when the user moved it around in the Finder while it was running. I
> was told by Apple to "use the bundle APIs correctly". So, now 5
> years later, I'm looking in to it.
>
> I have a very simple Cocoa app with a window in a nib with a static
> PNG in the window (inside an NSImageView).
>
> I create the window with:
>
> [[NibClass alloc] initWithWindowNibName: @"NibName"];
>
> When I move the app while it's running, and create the window
> again, Cocoa is all confused and can't find the image referenced by
> the Nib. And not just images, it can't find localized strings and
> other important doodads in the App bundle.
>
> So, what's the proper way to handle this so I can "use the bundle
> APIs correctly"? Is there some way to inform Cocoa that my app has
> moved?
>
> Thanks,
> Sanford
>
> PS - The 10.5.1 Finder did not warn me when I moved my app while it
> was running.
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| Sanford Selznick | Feb 7, 20:50 | |
| Phil | Feb 7, 21:31 | |
| William Bates | Feb 8, 04:28 | |
| Mac Man | Feb 8, 05:38 | |
| Gregory Weston | Feb 8, 13:42 | |
| Sean McBride | Feb 8, 16:37 | |
| Jens Alfke | Feb 8, 18:11 | |
| Kyle Sluder | Feb 8, 18:16 | |
| Phil | Feb 8, 21:06 | |
| William Bates | Feb 8, 22:52 | |
| Stephen Hoffman | Feb 9, 00:19 | |
| Stephen Hoffman | Feb 9, 00:32 |






Cocoa mail archive

