• 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: Cocoa vs User: 0 - 1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa vs User: 0 - 1


  • Subject: Re: Cocoa vs User: 0 - 1
  • From: Charles Srstka <email@hidden>
  • Date: Sat, 17 Apr 2004 14:35:03 -0500

On Apr 17, 2004, at 11:35 AM, Andreas Mayer wrote:

Am 17.04.2004 um 18:10 schrieb Ondra Cada:

the more so since it is (but for a very small number of apps
specially written with that in mind) quite impossible.

If it's impossible, it shouldn't be allowed.

You can argue as much as you want. Letting the user do something without even a warning when you know it will wreak havoc is just wrong.

But it's not impossible - not even close. In fact, if this particular bug was fixed, and NSBundle, loadNibNamed:owner:, et al did things the proper way by resolving an alias or FSRef to get the app path when needed, I believe that about 99% of apps would work just fine when moved, without having any problems at all. In order to break things when an app was moved, the developer would almost have to make a conscious effort to break it. Let's face it, how often do you refer to your application's path or to that of files inside the app bundle other than through NSBundle or similar API's? And what reason would there even be to get the path some other way? Bottom line - this can be fixed quickly, easily, and simply by making NSBundle not cache as many things.

The caching causes other problems than these, as well - I've had problems where I have a document type that is a bundle, and I use NSBundle to refer to it. But sometimes I have two CD's, each of which has the same name and one of these document-bundles in the same location. If I open the document-bundle on one disk, then eject it and open the corresponding document-bundle on a second disk, NSBundle screws up by using cached information from the first time, which was with a completely different document, causing everything to go wonky. You see, the problem with aggressive caching is that if something changes in the file system, and you're making assumptions based on the way things *used* to be, you're going to end up giving inaccurate results.

Basically, it's a bug in the API, and it ought to be fixed.

Charles
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Cocoa vs User: 0 - 1
      • From: Ondra Cada <email@hidden>
References: 
 >Cocoa vs User: 0 - 1 (From: Stéphane Sudre <email@hidden>)
 >Re: Cocoa vs User: 0 - 1 (From: Ondra Cada <email@hidden>)
 >Re: Cocoa vs User: 0 - 1 (From: Rosyna <email@hidden>)
 >Re: Cocoa vs User: 0 - 1 (From: Ondra Cada <email@hidden>)
 >Re: Cocoa vs User: 0 - 1 (From: Charles Srstka <email@hidden>)
 >Re: Cocoa vs User: 0 - 1 (From: Ondra Cada <email@hidden>)
 >Re: Cocoa vs User: 0 - 1 (From: Rosyna <email@hidden>)
 >Re: Cocoa vs User: 0 - 1 (From: Ondra Cada <email@hidden>)
 >Re: Cocoa vs User: 0 - 1 (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Re: OBJ-C question
  • Next by Date: Re: OBJ-C question
  • Previous by thread: Re: Cocoa vs User: 0 - 1
  • Next by thread: Re: Cocoa vs User: 0 - 1
  • Index(es):
    • Date
    • Thread