• 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: How to use Uniform Type Identifiers for this ... ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use Uniform Type Identifiers for this ... ?


  • Subject: Re: How to use Uniform Type Identifiers for this ... ?
  • From: Jay Reynolds Freeman <email@hidden>
  • Date: Sun, 25 Oct 2009 20:28:24 -0700

The issue isn't that it crashes, the issue is that I cannot test that any given version of "MyApp" does the right thing with the right version of the binary file, unless I can get the finder to match up the file that I mouse on with the right version of the app.

I in fact do have a mechanism to report when the wrong kind of file is sent to an app, the issue is making sure the right one gets there so that I can see that the app handles it correctly. I spoke too briefly, the point is that the app cannot use the wrong versions of the binary file, so I cannot run tests with them.

Thanks to the group for good suggestions.

--  Jay Reynolds Freeman
---------------------
email@hidden
http://web.mac.com/jay_reynolds_freeman (personal web site)


On Oct 25, 2009, at 7:20 PM, Greg Guerin wrote:

Jay Reynolds Freeman wrote:

Rather than trying to trick the system into preventing your application's crashiness, I recommend making your application less crash-prone. One simple way to do this is to write a version-number at the head of your binary file. This should be done in a way that all versions of the app can read. The remainder of the data can be crash-inducing if the app doesn't recognize the version-number. Then write code that reads the uniformly readable version-number, and decides whether to continue or stop. By "stop" I don't mean crash, or fail horribly, or quit unexpectedly. I mean refrain from reading the rest of the file, possibly with an alert. It could even mean doing nothing but issuing a beep. Anything but crashing.

As a wild guess, it would take less time to implement a version- numbering scheme than to figure out any UTI trickery. It would also have the long-term advantage of making your app less crash-prone.

 -- GG

_______________________________________________

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


References: 
 >Re: How to use Uniform Type Identifiers for this ... ? (From: Greg Guerin <email@hidden>)

  • Prev by Date: kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region
  • Next by Date: Re: Why getting two awakeFromNib messages??
  • Previous by thread: Re: How to use Uniform Type Identifiers for this ... ?
  • Next by thread: Re: How to use Uniform Type Identifiers for this ... ?
  • Index(es):
    • Date
    • Thread