Re: NSOutlineView: what does this even mean?

2014-05-22 Thread Graham Cox
On 23 May 2014, at 1:09 pm, Kyle Sluder wrote: > Did you remember to set your table view to View Based mode first? I just > successfully dropped a Custom View _below_ the existing text cell view > in a table view in Xcode 5.1.1. Yep, it's set to view-based. Strange, I just can't drop a custom

Re: NSOutlineView: what does this even mean?

2014-05-22 Thread Kyle Sluder
On Thu, May 22, 2014, at 07:00 PM, Graham Cox wrote: > I still have a problem doing this though. In the video, a custom table > row view is shown as a subview of the table, and sure enough, the > identifier and class can be set there. But when I try it, there is no > such view available, neither al

Re: NSOutlineView dragging weirdness [SOLVED]

2014-05-22 Thread Graham Cox
Thanks Ken, though it turned out to be a stupid error on my part (not unexpectedly!). My custom cell view declared a property I called 'layer' which returns the associated model object. Of course this conflicts with NSView's 'layer' property which returns any underlying Core Animation layer, so

Re: NSOutlineView: what does this even mean?

2014-05-22 Thread Graham Cox
On 22 May 2014, at 2:20 pm, Kyle Sluder wrote: > On May 22, 2014, at 12:15 AM, Graham Cox wrote: >> >> So I want to use a custom subclass of NSTableRowView so I can use an >> in-house UI highlighting style. It's far from obvious how to do this, even >> though other documentation states that

Can MCPeerID be used as a key in a dictionary?

2014-05-22 Thread Rick Mann
Is MCPeerID usable as a key? It can be used as a key, I've verified that, but will I only ever get the same instance for a specific peer, even after disconnecting and re-connecting? If the instances are different, are the -hash and -equals: methods properly overridden? If not, how can I map pee

Window gets moved to the wrong location when changing screen resolution

2014-05-22 Thread Mills, Steve
Our app has a bunch of palettes (NSPanels). One of them is usually flush against the menubar and against the left edge of the monitor. These palettes have setMovable:NO set on them, because we needed to handle moving them ourselves so they will snap into place. When the screen res changes, we al

Core Data Trouble - Exception in configurePersistentStoreCoordinatorForURL:ofType:modelConfiguration:storeOptions:error:

2014-05-22 Thread Motti Shneor
Hi. In my NSPersistentDocument based application (SDK 10.9, Deployment 10.8 XCode 5.1.1) The main document window is loaded from a .xib file. Recently I started to experience the following ill behavior. If I open an old existing document, all is well. I can manipulate, add entities, remove, an

Re: Document architecture: locking document files while open

2014-05-22 Thread Jens Alfke
On May 22, 2014, at 9:44 AM, Gary L. Wade wrote: > I've only just run across this as a potential solution to a prospective need, > but might Kernel Authorizations be what you need? > https://developer.apple.com/library/mac/technotes/tn2127/_index.html Only if you’re implementing your own files

Re: Document architecture: locking document files while open

2014-05-22 Thread Gary L. Wade
I've only just run across this as a potential solution to a prospective need, but might Kernel Authorizations be what you need? https://developer.apple.com/library/mac/technotes/tn2127/_index.html -- Gary L. Wade (Sent from my iPhone) http://www.garywade.com/ > On May 22, 2014, at 9:21 AM, Jens

Re: NSAlert & NSOpenPanel on a background thread

2014-05-22 Thread edward taffel
On May 22, 2014, at 12:24 PM, Jens Alfke wrote: > > On May 22, 2014, at 8:54 AM, edward taffel wrote: > >> i find no mention of thread safety in the NSOpenPanel doc, but the doc >> mentions ‘Open panels are drawn in a separate process by the powerbox’: >> perhaps this is the reason. > > Th

Re: NSAlert & NSOpenPanel on a background thread

2014-05-22 Thread Jens Alfke
On May 22, 2014, at 8:54 AM, edward taffel wrote: > i find no mention of thread safety in the NSOpenPanel doc, but the doc > mentions ‘Open panels are drawn in a separate process by the powerbox’: > perhaps this is the reason. That’s done because the Open panel itself can’t be bound by the li

Re: NSAlert & NSOpenPanel on a background thread

2014-05-22 Thread Fritz Anderson
On 22 May 2014, at 10:54 AM, edward taffel wrote: > i find no mention of thread safety in the NSOpenPanel doc, but the doc > mentions ‘Open panels are drawn in a separate process by the powerbox’: > perhaps this is the reason. This is one of those rules so universal in Apple APIs that it is ne

Re: CGDisplaySetDisplayMode only working properly after calling twice in a row

2014-05-22 Thread Matthias Dörfelt
Thanks for the detailed reply, that makes a lot of sense. I tried putting the display capturing in multiple places, without any success. My temporary work around really is to just call CGDisplaySetDisplayMode twice (as that is the only „easy" solution I found), as I don’t really wan’t to write a

Re: Document architecture: locking document files while open

2014-05-22 Thread Jens Alfke
On May 22, 2014, at 8:51 AM, Matthew LeRoy wrote: > Does anyone have any idea if there is a way to get the document architecture > to lock a document file when it is opened? If you implement the lower-level read/write methods in NSDocument, you have full control over opening and closing the f

Re: NSAlert & NSOpenPanel on a background thread

2014-05-22 Thread edward taffel
On May 22, 2014, at 11:41 AM, Jens Alfke wrote: > > On May 22, 2014, at 8:29 AM, edward taffel wrote: > >> this i have remedied. however, given the scenario where a url has vanished, >> i first show an NSAlert & then an NSOpenPanel to offer relink. NSOpenPanel >> causes no such background t

Document architecture: locking document files while open

2014-05-22 Thread Matthew LeRoy
Good morning, Does anyone have any idea if there is a way to get the document architecture to lock a document file when it is opened? When I say “lock”, I’m talking about an exclusive file lock at the filesystem level, as in no other user or process can open, move, or delete the file. I’m not t

Re: NSAlert & NSOpenPanel on a background thread

2014-05-22 Thread Jens Alfke
On May 22, 2014, at 8:29 AM, edward taffel wrote: > this i have remedied. however, given the scenario where a url has vanished, i > first show an NSAlert & then an NSOpenPanel to offer relink. NSOpenPanel > causes no such background thread issue: do the two have variant thread > safety? or is

Re: ANN: Couchbase Lite 1.0 database/sync library

2014-05-22 Thread Rui Pacheco
This is very interesting. On 22 May 2014, at 17:37, Jens Alfke wrote: > Hey everyone, my day-job project that I’ve been toiling on for three years(!) > has finally gone 1.0. > http://www.couchbase.com/mobile > http://developer.couchbase.com/mobile/ > https://github.com/couchba

ANN: Couchbase Lite 1.0 database/sync library

2014-05-22 Thread Jens Alfke
Hey everyone, my day-job project that I’ve been toiling on for three years(!) has finally gone 1.0. http://www.couchbase.com/mobile http://developer.couchbase.com/mobile/ https://github.com/couchbase/couchbase-lite-ios In my own non-marketing speak: Couchbase Lite is an op

NSAlert & NSOpenPanel on a background thread

2014-05-22 Thread edward taffel
opening an NSAlert while scanning an autosaved document now engenders the following log item: NSAlert is being used from a background thread, which is not safe. This is probably going to crash sometimes. Break on void _NSAlertWarnUnsafeBackgroundThreadUsage() to debug. This will be logged onl

Re: Where are the errors in NSOSStatusErrorDomain defined?

2014-05-22 Thread Sean McBride
On Thu, 22 May 2014 12:17:50 +0700, Gerriet M. Denkmann said: >Got an NSError with: > >"Error Domain=NSOSStatusErrorDomain Code=560030580 "The operation >couldn’t be completed. (OSStatus error 560030580.)"" In addition to what others have said. Check MacErrors.h. You can also use the 'macerror

Re: CGDisplaySetDisplayMode only working properly after calling twice in a row

2014-05-22 Thread Ken Thomases
On May 21, 2014, at 6:25 PM, Matthias Dörfelt wrote: > Capturing the display does not make a difference. Did you capture it before or after creating the pixel format object? > Anyways, your guess about the GPU switching was spot on! If I disable it, the > issue disappears. Is there any way to f

Re: NSOutlineView dragging weirdness

2014-05-22 Thread Ken Thomases
On May 21, 2014, at 10:10 PM, Graham Cox wrote: > I'm using NSOutlineView with view-based rows. I've set it up to allow drag > and drop of a row. When the drag is initiated, it throws an exception with > the following stack trace: > > #00x7fff8b6d4e4a in objc_exception_throw () > #1

Re: Creating Url with Fragment

2014-05-22 Thread Gerriet M. Denkmann
On 22 May 2014, at 17:25, Mike Abdullah wrote: > > On 22 May 2014, at 11:07, Gerriet M. Denkmann wrote: > >> >> This works: >> NSString *fragment = >> NSString *absString = [ @"https://translate.google.com/#"; >> stringByAppendingString: fragment ]; >> NSURL *url = [ [ N

Re: Creating Url with Fragment

2014-05-22 Thread Mike Abdullah
On 22 May 2014, at 11:07, Gerriet M. Denkmann wrote: > > This works: > NSString *fragment = > NSString *absString = [ @"https://translate.google.com/#"; > stringByAppendingString: fragment ]; > NSURL *url = [ [ NSURL alloc ] initWithString: absString ]; > > But I would

Creating Url with Fragment

2014-05-22 Thread Gerriet M. Denkmann
This works: NSString *fragment = NSString *absString = [ @"https://translate.google.com/#"; stringByAppendingString: fragment ]; NSURL *url = [ [ NSURL alloc ] initWithString: absString ]; But I would like to use something like this: NSURL *url = [ [ NSURL al

Re: Where are the errors in NSOSStatusErrorDomain defined?

2014-05-22 Thread Uli Kusterer
On 22 May 2014, at 07:50, Ben Kennedy wrote: > If that is indeed the context in which Gerriet is receiving the error, it > sounds as though the routine generating it is assigning an inappropriate > error domain then, no? Surely it should be a CoreAudio-related domain > (specifically for the rea