Re: UTI strings

2010-06-01 Thread John Joyce
On Jun 1, 2010, at 9:26 AM, Sean McBride wrote: > On Tue, 1 Jun 2010 00:29:54 -0500, John Joyce said: > Remember, that although creator codes are out, extensions *seem* to be recognized, and... being a BSD, there is still also the *magic number* for file >> types... (the magi

Re: UTI strings

2010-06-01 Thread Sean McBride
On Tue, 1 Jun 2010 00:29:54 -0500, John Joyce said: >>> Remember, that although creator codes are out, extensions *seem* to be >>> recognized, >>> and... being a BSD, there is still also the *magic number* for file >types... >>> (the magic file does get updated regularly) >> >> Is the magic file q

Re: UTI strings

2010-05-31 Thread John Joyce
On May 31, 2010, at 4:58 PM, Sean McBride wrote: > On Mon, 31 May 2010 10:39:38 -0500, John Joyce said: > >> Remember, that although creator codes are out, extensions *seem* to be >> recognized, >> and... being a BSD, there is still also the *magic number* for file types... >> (the magic file do

Re: UTI strings

2010-05-31 Thread Sean McBride
On Mon, 31 May 2010 10:39:38 -0500, John Joyce said: >Remember, that although creator codes are out, extensions *seem* to be >recognized, > and... being a BSD, there is still also the *magic number* for file types... >(the magic file does get updated regularly) John, Is the magic file queried wh

Re: UTI strings

2010-05-31 Thread John Joyce
On May 31, 2010, at 4:28 AM, julius wrote: > > On 31 May 2010, at 10:06, Jean-Daniel Dupas wrote: >>> >>> Can you perhaps tell me which UTI maps onto NSPlainTextDocumentType >> >> You would guess on kUTTypePlainText >> >>> and which onto NSMacSimpleTextDocumentType ? >> >> In 3 major rel

Re: UTI strings

2010-05-31 Thread julius
On 31 May 2010, at 10:06, Jean-Daniel Dupas wrote: >> >> Can you perhaps tell me which UTI maps onto NSPlainTextDocumentType > > You would guess on kUTTypePlainText > >> and which onto NSMacSimpleTextDocumentType ? > > In 3 major releases Apple didn't managed to declare UTI for modern file

Re: UTI strings

2010-05-31 Thread julius
On 31 May 2010, at 10:23, Ken Thomases wrote: > On May 31, 2010, at 4:06 AM, Jean-Daniel Dupas wrote: > >> Le 31 mai 2010 à 10:53, julius a écrit : >> >>> and which onto NSMacSimpleTextDocumentType ? >> >> In 3 major releases Apple didn't managed to declare UTI for modern file >> formats

Re: UTI strings

2010-05-31 Thread Ken Thomases
On May 31, 2010, at 4:06 AM, Jean-Daniel Dupas wrote: > Le 31 mai 2010 à 10:53, julius a écrit : > >> and which onto NSMacSimpleTextDocumentType ? > > In 3 major releases Apple didn't managed to declare UTI for modern file > formats like sdef, $ mdls foo.sdef ... kMDItemContentType

Re: UTI strings

2010-05-31 Thread Jean-Daniel Dupas
Le 31 mai 2010 à 10:53, julius a écrit : > On 31 May 2010, at 09:43, Jean-Daniel Dupas wrote: This data is covered, but you may want to explore further the docs, a few books on cocoa, and sample apps from apple. Look at how they handle this. Ideally, look at open source

Re: UTI strings

2010-05-31 Thread Ken Thomases
On May 30, 2010, at 5:15 PM, julius wrote: > On 30 May 2010, at 20:21, Ken Thomases wrote: > >> On May 30, 2010, at 1:04 PM, julius wrote: >> >>> unless of course there's a way of specifying the constants for >>> NSAttributedString using the kUTTypes that I've not found yet >> >> The Snow Leop

Re: UTI strings

2010-05-31 Thread julius
On 31 May 2010, at 09:43, Jean-Daniel Dupas wrote: >>> >>> This data is covered, but you may want to explore further the docs, a few >>> books on cocoa, and sample apps from apple. >>> Look at how they handle this. >>> Ideally, look at open source or sample apps that handle similar file types >>

Re: UTI strings

2010-05-31 Thread Jean-Daniel Dupas
Le 31 mai 2010 à 10:25, julius a écrit : > > On 31 May 2010, at 01:42, John Joyce wrote: > >> >> On May 30, 2010, at 5:15 PM, julius wrote: >> >>> John hi >>> On 30 May 2010, at 19:47, John Joyce wrote: >>> That's not how these constants work. These are intended to be constants tha

Re: UTI strings

2010-05-31 Thread julius
On 31 May 2010, at 01:42, John Joyce wrote: > > On May 30, 2010, at 5:15 PM, julius wrote: > >> John hi >> On 30 May 2010, at 19:47, John Joyce wrote: >> >>> That's not how these constants work. >>> These are intended to be constants that return the correct type for the >>> current build of t

Re: UTI strings

2010-05-30 Thread John Joyce
On May 30, 2010, at 5:15 PM, julius wrote: > John hi > On 30 May 2010, at 19:47, John Joyce wrote: > >> That's not how these constants work. >> These are intended to be constants that return the correct type for the >> current build of the system. >> This protects your software from a change in

Re: UTI strings

2010-05-30 Thread julius
Ken hi, thanks for responding. On 30 May 2010, at 20:21, Ken Thomases wrote: > On May 30, 2010, at 1:04 PM, julius wrote: > >> unless of course there's a way of specifying the constants for >> NSAttributedString using the kUTTypes that I've not found yet > > The Snow Leopard AppKit release note

Re: UTI strings

2010-05-30 Thread julius
John hi On 30 May 2010, at 19:47, John Joyce wrote: > That's not how these constants work. > These are intended to be constants that return the correct type for the > current build of the system. > This protects your software from a change in the actual UTI of a common type. > I can understand

Re: UTI strings

2010-05-30 Thread Ken Thomases
On May 30, 2010, at 1:04 PM, julius wrote: > unless of course there's a way of specifying the constants for > NSAttributedString using the kUTTypes that I've not found yet The Snow Leopard AppKit release notes include this

Re: UTI strings

2010-05-30 Thread John Joyce
That's not how these constants work. These are intended to be constants that return the correct type for the current build of the system. This protects your software from a change in the actual UTI of a common type. On May 30, 2010, at 1:04 PM, julius wrote: > Mike > Thanks, that's a great dia

Re: UTI strings

2010-05-30 Thread julius
Mike Thanks, that's a great diagram but as far as I can see it's not the kUTTypes that are for me the problem but rather just determining which UTI goes with which of the NSPlainTextDocumentType NSRTFTextDocumentType NSRTFDTextDocumentType NSMacSimpleTextDocumentType NSHTMLTextDocumentType NSD

Re: UTI strings

2010-05-30 Thread Mike Abdullah
This should give a decent overview of the main system types: http://www.mikeabdullah.net/utis_diagram/ On 30 May 2010, at 17:47, julius wrote: > Kyle Thanks > > I'm obviously missing something, what type for instance maps onto > NSPlainTextDocumentType? > I'm currently working my way down the

Re: UTI strings

2010-05-30 Thread julius
Kyle Thanks I'm obviously missing something, what type for instance maps onto NSPlainTextDocumentType? I'm currently working my way down the UTI list by a process of elimination, i.e. put a UTI into the Info.plist then try to save a document as that type and see if my choice of document type r

Re: UTI strings

2010-05-30 Thread Kyle Sluder
On Sun, May 30, 2010 at 9:22 AM, julius wrote: > I'm having difficulties finding the Uniform Type Identifier strings that > correspond to the document types associated with the > NSDocumentTypeDocumentAttribute key as specified in the NSAttributedString > Application Kit Additions Reference /S