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

Re: Carbon vs Cocoa


  • Subject: Re: Carbon vs Cocoa
  • From: Charles Srstka <email@hidden>
  • Date: Wed, 2 Oct 2002 20:08:00 -0500

Don't screw around with NSString. That will just cause unexpected behavior if we actually have some need to have a path that won't change for some reason. A better solution would be to make NSURL able to use an FSRef. Should be a whole lot easier than hacking around with NSString (just alter -[NSURL path] to resolve the alias and return the path, rather than mucking around with all the string-manipulation methods). Just do that, and then make the statement that NSURL is the preferred way to manipulate files more than just lip service - make NSFileManager, NSFileHandle, etc. able to take them as input, and you're in business.

Charles

On Wednesday, October 2, 2002, at 06:13 PM, email@hidden wrote:

I'm aware of all this.

The only thing I wish to add is that FSRefs appear to work
correctly regardless of filesystem.

Perhaps a subclass or category of NSString could be written
which uses an FSRef internally which is automatically
converted to a string whenever it is treated as a string (editing
or reading it). Sounds like a lot of work though |-\

I tried doing something similar in Java to fix File.class but that
was also a pain in the ass which in the end didn't work since
Java doesn't allow class extentions and I would end up
begging all Java developers to use my subclass which wouldn't
ever happen.

Sigh.

Using FSRefs is unacceptable for a lot of things. (Save and
Revert is
ok though) since on UFS volumes they are not valid between
applications or application launches so they can't be
communicated to
eachother. However, if you convert the FSRef to a POSIX
path or an
Alias then pass it and convert it back to FSRef, all is well. So
ignore everything I just said in this email since it's completely
moot but I am too lazy to delete this message.

Ack, at 10/2/02, email@hidden said:
_______________________________________________
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.
_______________________________________________
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.

References: 
 >Re: Carbon vs Cocoa (From: email@hidden)

  • Prev by Date: Re: [semi-newbie] Message sent to NSWindowController after complete window load
  • Next by Date: RE: Bochs - Free PC emulator
  • Previous by thread: Re: Carbon vs Cocoa
  • Next by thread: Re: Carbon vs Cocoa
  • Index(es):
    • Date
    • Thread