Core Data nested managed object contexts and frequent deadlocks

2012-01-13 Thread Michael Link
I have a parent MOC setup with NSPrivateQueueConcurrencyType and a persistent store coordinator set, it has a child MOC setup with NSMainQueueConcurrencyType. The idea being most of the long hard work and saves can be done on the private MOC freeing the main thread from blocking the UI. Unfortu

Re: Messed up UTIs in NSDocument-based application

2012-01-13 Thread Michael Thon
What happens if you define two document types? "My Document", Extension: "myext", Identifier: "" "My Document", Extension: "myext", Identifier: "com.mycompany.myext" Although it might be better to use a new extension for the new doc type. On Jan 11, 2012, at 4:26 AM, Donald Ness wrote: > So I re

TBXML question

2012-01-13 Thread Eric E. Dolecki
I have XML like this: I am trying pull out the name and then each of the playlists. I need help with my while loop (to get all the playlists) - I've bolded that bit. - (void)parseThatXML:(TBXMLElement *)element { do { if(element -> firstChild)

Re: Is slowing down bindings updates possible?

2012-01-13 Thread Keary Suska
On Jan 12, 2012, at 10:57 PM, Andrew wrote: > I have a download controller with an NSMutableArray and an > NSArrayController hooked up to a NSTableView with a view based setup. > My array contains custom download objects. Each of those has a > NSURLDownload instance. > > Basically, I am showing a

Re: Is slowing down bindings updates possible?

2012-01-13 Thread Steve Christensen
Why don't you just decouple your UI from the "by-the-millisecond" download process? For example, you could update calculated values whenever the value of bytesDownloaded changes but use a NSTimer to update the display of those values maybe once or twice a second. The display is then sampling the

Re: LSSharedFileListInsertItemURL/SMLoginItemSetEnabled and sandbox

2012-01-13 Thread Torsten Curdt
>> Anyone aware of sample code for the suggested helper app that manages >> the login items via SMLoginItemSetEnabled? Not battle tested yet but seems to work... https://github.com/tcurdt/TCLoginItemHelper Still need to find a nice way to get bundle id into the subproject. But that's more a Xcod

Child windows appear to move when entering full-screen mode / how to detect full-screen transition

2012-01-13 Thread Michael Crawford
I have an app that is using borderless child windows to suspend controls over an instance of NSScrollView. When entering full-screen (on Lion) the child windows appear to move, I assume to make sure they are within the confines of the parent window and full-screen dimensions. I tried to compen

Re: Core Data nested managed object contexts and frequent deadlocks

2012-01-13 Thread Chris Hanson
On Jan 13, 2012, at 12:39 AM, Michael Link wrote: > the docs seem to indicate that using a main thread concurrency type MOC on > the main thread without performBlock: is fine. It is, otherwise you couldn't (say) bind to a managed object you fetched via a main-queue context on OS X. What OS ver

Re: Core Data nested managed object contexts and frequent deadlocks

2012-01-13 Thread Michael Link
On Jan 13, 2012, at 3:45 PM, Chris Hanson wrote: > On Jan 13, 2012, at 12:39 AM, Michael Link wrote: > >> the docs seem to indicate that using a main thread concurrency type MOC on >> the main thread without performBlock: is fine. > > It is, otherwise you couldn't (say) bind to a managed objec

Re: Child windows appear to move when entering full-screen mode / how to detect full-screen transition

2012-01-13 Thread Lee Ann Rucker
http://developer.apple.com/library/mac/#documentation/cocoa/reference/NSWindowDelegate_Protocol/Reference/Reference.html windowWillEnterFullScreen: etc. Also I recommend http://developer.apple.com/library/mac/#samplecode/FullScreenWindow/Introduction/Intro.html Sketch+Fullscreen is also usefu

Re: TBXML question

2012-01-13 Thread Philip Vallone
Hi Eric, Have you considered using Libxml and xpath? Take a look at http://cocoawithlove.com/2008/10/using-libxml2-for-parsing-and-xpath.html. Phil On Jan 13, 2012, at 9:23 AM, Eric E. Dolecki wrote: > I have XML like this: > > > > > > > > > > I am trying pull ou

Re: TBXML question

2012-01-13 Thread Jens Alfke
On Jan 13, 2012, at 5:16 PM, Philip Vallone wrote: > Have you considered using Libxml and xpath? Take a look at > http://cocoawithlove.com/2008/10/using-libxml2-for-parsing-and-xpath.html. libxml is very powerful but it’s also very low-level, and quite grungy to use. If there’s an Obj-C API

Adding an observer to an NSOperation crashes my app.

2012-01-13 Thread G S
Hi all. Working on an iPhone app and encountered a stumper. I have various kinds of operations (derived from NSOperation) to do async queries over the Internet. As is the norm, I determine when they're finished by observing their isFinished property, and getting the results in observeValueForKeyP