• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: My app breaks when moved while running
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: My app breaks when moved while running


  • Subject: Re: My app breaks when moved while running
  • From: Phil <email@hidden>
  • Date: Thu, 7 Feb 2008 15:31:41 -0500

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@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

_______________________________________________

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


  • Follow-Ups:
    • Re: My app breaks when moved while running
      • From: "Sean McBride" <email@hidden>
References: 
 >My app breaks when moved while running (From: Sanford Selznick <email@hidden>)

  • Prev by Date: Re: Understanding objc_assign_strongCast
  • Next by Date: Mac OS X version 10.5 or later is required for zerocost-exceptions???
  • Previous by thread: My app breaks when moved while running
  • Next by thread: Re: My app breaks when moved while running
  • Index(es):
    • Date
    • Thread