Skip navigation.
 
mlMy app breaks when moved while running
FROM : Sanford Selznick
DATE : Thu Feb 07 20:50:20 2008

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.

Related mailsAuthorDate
mlMy app breaks when moved while running Sanford Selznick Feb 7, 20:50
mlRe: My app breaks when moved while running Phil Feb 7, 21:31
mlRe: My app breaks when moved while running William Bates Feb 8, 04:28
mlRe: My app breaks when moved while running Mac Man Feb 8, 05:38
mlRe: My app breaks when moved while running Gregory Weston Feb 8, 13:42
mlRe: My app breaks when moved while running Sean McBride Feb 8, 16:37
mlRe: My app breaks when moved while running Jens Alfke Feb 8, 18:11
mlRe: My app breaks when moved while running Kyle Sluder Feb 8, 18:16
mlRe: My app breaks when moved while running Phil Feb 8, 21:06
mlRe: My app breaks when moved while running William Bates Feb 8, 22:52
mlRe: My app breaks when moved while running Stephen Hoffman Feb 9, 00:19
mlRe: My app breaks when moved while running Stephen Hoffman Feb 9, 00:32