NSFileWrapper serializedRepresentation

2016-04-04 Thread Gerriet M. Denkmann
NSFileWrapper *fileWrapper = … some Folder … NSData *dataRaw = fileWrapper.serializedRepresentation; NSDate *dataCompressed = … COMPRESSION_LZFSE … When I do this in OS X 10.11.4 dataRaw = 30380898, dataCompressed = 5638680 ( 18.6 %) But in the iOS Simulator 9.3.1: dataRaw = 28206422, dataCompre

Text Field Formatting Problem

2016-04-04 Thread Dave
Hi, This is on a Mac using Auto Layout. I have an NSScrollView which contains a Clip View which in turn contains an NSTextView. The data I wish to display is formatted as so: The first long line of a number of lines that I’d like to wrap to the bounding rect of the next field. The second lo

Re: How to find the file (url) that was double-clicked to open my Cocoa Application?

2016-04-04 Thread Motti Shneor
OK. I’ll have to answer my own question. Please forgive me answer is neither definitive nor complete, and is ugly - but it works. Generally: 1. In a Document based application - the [[[NSDocumentController sharedController] documents] firstObject] will give you also access to the file. 2. In

Does NSOutlineView's highlightedTableColumn work?

2016-04-04 Thread David Catmull
Is setting the highlightedTableColumn property on an NSOutlineView supposed to work? I’m expecting the column background to darken, but nothing seems to happen. Showing the column headers didn’t help (I normally have them hidden), and neither did setting a sort key for the column. I’m trying to

Re: Does NSOutlineView's highlightedTableColumn work?

2016-04-04 Thread Ken Thomases
On Apr 4, 2016, at 8:39 AM, David Catmull wrote: > > Is setting the highlightedTableColumn property on an NSOutlineView supposed > to work? I’m expecting the column background to darken, but nothing seems to > happen. > > Showing the column headers didn’t help (I normally have them hidden), an

UTI

2016-04-04 Thread Gerriet M. Denkmann
I have an OS X app, which creates a file like: SomeName.zapmax This file has: ContentType: dyn.ad6s….j67df Extended Attribut: com.apple.metadata:kMDLabel_u37…wqm = some unrecognisable data ContentTypeTree: public.data ← public.item This file gets sent via AirDrop to an iOS Device. On this iOS D

Re: UTI

2016-04-04 Thread Quincey Morris
On Apr 4, 2016, at 08:30 , Gerriet M. Denkmann wrote: > > That is, how to associate a special UTI with the file? You first need to *define* your own UTI. Add an entry to the Exported UTIs section of the Info pane of the OS X app target in Xcode. For the UTI identifier, enter a unique name usin

Re: NSFileWrapper serializedRepresentation

2016-04-04 Thread Jens Alfke
> On Apr 4, 2016, at 1:18 AM, Gerriet M. Denkmann wrote: > > When I do this in OS X 10.11.4 dataRaw = 30380898, dataCompressed = 5638680 ( > 18.6 %) > But in the iOS Simulator 9.3.1: dataRaw = 28206422, dataCompressed = 4282602 > ( 15.2 %) > > That is OS X (10.11.4) makes an 8 % bigger FileWr

Re: NSFileWrapper serializedRepresentation

2016-04-04 Thread Gerriet M. Denkmann
> On 4 Apr 2016, at 23:49, Jens Alfke wrote: > > >> On Apr 4, 2016, at 1:18 AM, Gerriet M. Denkmann wrote: >> >> When I do this in OS X 10.11.4 dataRaw = 30380898, dataCompressed = 5638680 >> ( 18.6 %) >> But in the iOS Simulator 9.3.1: dataRaw = 28206422, dataCompressed = 4282602 >> ( 15.2

Re: NSFileWrapper serializedRepresentation

2016-04-04 Thread Quincey Morris
On Apr 4, 2016, at 09:59 , Gerriet M. Denkmann wrote: > > Both the Simulator and the OS X App compress the same folder (which resides > on OS X). You can’t really use a convenience API such as ‘serializedRepresentation’ and then complain it doesn’t optimize for your specific use case. Concise

Re: Does NSOutlineView's highlightedTableColumn work?

2016-04-04 Thread David Catmull
> Are you sure a (rather small) sort indicator didn't appear in the column's > header? No, nothing appeared there either. >> I’m trying to use the column highlight to indicate a view state unrelated to >> sorting… > > Don't do that. Don't try to hijack features intended for one semantic for

Re: NSFileWrapper serializedRepresentation

2016-04-04 Thread Gerriet M. Denkmann
> On 5 Apr 2016, at 00:35, Quincey Morris > wrote: > > On Apr 4, 2016, at 09:59 , Gerriet M. Denkmann wrote: >> >> Both the Simulator and the OS X App compress the same folder (which resides >> on OS X). > Incidentally, the OS X documentation for NSFileContentsPboardType, > serializedRepre

Re: UTI

2016-04-04 Thread Gerriet M. Denkmann
> On 4 Apr 2016, at 23:48, Quincey Morris > wrote: > > On Apr 4, 2016, at 08:30 , Gerriet M. Denkmann wrote: >> >> That is, how to associate a special UTI with the file? > > You first need to *define* your own UTI. Add an entry to the Exported UTIs > section of the Info pane of the OS X app

Re: NSFileWrapper serializedRepresentation

2016-04-04 Thread Graham Cox
> On 5 Apr 2016, at 10:41 AM, Gerriet M. Denkmann wrote: > > What are the alternatives? file paths or NSURL? —Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Con

Re: NSFileWrapper serializedRepresentation

2016-04-04 Thread Gerriet M. Denkmann
> On 5 Apr 2016, at 08:17, Graham Cox wrote: > >> On 5 Apr 2016, at 10:41 AM, Gerriet M. Denkmann wrote: >> >> What are the alternatives? > > file paths or NSURL? Not really. If I send file paths or NSURLs (pointing to files on OS X) to my iOS Devices, these would not be very useful. I real

Re: NSFileWrapper serializedRepresentation

2016-04-04 Thread Jens Alfke
> On Apr 4, 2016, at 9:59 AM, Gerriet M. Denkmann wrote: > > Both the Simulator and the OS X App compress the same folder (which resides > on OS X). OK, but the raw data size is significantly different, so they must be zipping different data. I don’t know why that would be; maybe the file pat

Re: NSFileWrapper serializedRepresentation

2016-04-04 Thread Graham Cox
> On 5 Apr 2016, at 11:30 AM, Gerriet M. Denkmann wrote: > > >> On 5 Apr 2016, at 08:17, Graham Cox wrote: >> >>> On 5 Apr 2016, at 10:41 AM, Gerriet M. Denkmann >>> wrote: >>> >>> What are the alternatives? >> >> file paths or NSURL? > > Not really. If I send file paths or NSURLs (point

Re: NSFileWrapper serializedRepresentation

2016-04-04 Thread Gerriet M. Denkmann
> On 5 Apr 2016, at 08:30, Jens Alfke wrote: > > >> On Apr 4, 2016, at 9:59 AM, Gerriet M. Denkmann wrote: >> >> Both the Simulator and the OS X App compress the same folder (which resides >> on OS X). > > OK, but the raw data size is significantly different, so they must be zipping > diff

Re: UTI

2016-04-04 Thread Gerriet M. Denkmann
> On 4 Apr 2016, at 23:48, Quincey Morris > wrote: > > On Apr 4, 2016, at 08:30 , Gerriet M. Denkmann wrote: >> >> That is, how to associate a special UTI with the file? A quick follow-up: Everything works even when the importing iOS app does NOT declare exported or imported UTIs. The only

Re: NSFileWrapper serializedRepresentation

2016-04-04 Thread Quincey Morris
On Apr 4, 2016, at 17:41 , Gerriet M. Denkmann wrote: > > What are the alternatives? What I had in mind is that you would construct a composite NSData object that contained the results of compressing each file’s content as sub-components. By compressing this yourself, you could (for example) c

Re: UTI

2016-04-04 Thread Quincey Morris
On Apr 4, 2016, at 18:16 , Gerriet M. Denkmann wrote: > > The importing iOS app has both exported and imported UTI defined (not sure > what is really needed). > > But when the Document Types is only “my.private.uti”, then I am not asked to > open in which app (good) but no data is received (ba

Re: UTI

2016-04-04 Thread Gerriet M. Denkmann
> On 5 Apr 2016, at 10:19, Quincey Morris > wrote: > > On Apr 4, 2016, at 18:16 , Gerriet M. Denkmann wrote: >> >> The importing iOS app has both exported and imported UTI defined (not sure >> what is really needed). >> >> But when the Document Types is only “my.private.uti”, then I am not