Re: Using NSArrayController with a complex, heterogeneous model

2015-01-16 Thread Jerry Krinock
> On 2015 Jan 16, at 21:35, Rick Mann wrote: > > The problem I see with two controllers has to do with managing the selection, > and numerous other problems. For example, I have an inspector that's looking > at the "current selection." How does it consider the unified selection of > both cont

Re: performBatchUpdates: + removeObjectAtIndex: = EXC_BAD_ACCESS

2015-01-16 Thread Jens Alfke
I suspect your code is getting called on multiple threads, which would definitely cause crashes or heap corruption since you haven't added any synchronization around your objects. If you don't explicitly use multiple threads, maybe the UICollectionView is running your performBatchUpdates: block

Re: Using NSArrayController with a complex, heterogeneous model

2015-01-16 Thread Rick Mann
> On Jan 16, 2015, at 21:20 , Jerry Krinock wrote: > > >> On 2015 Jan 16, at 20:58, Rick Mann wrote: >> >> A "Part" in my app has a set of geometric primitives, and a set of labels >> (both have a common base class). These are two separate sets (arrays) on the >> part. But when editing the

Re: Directory navigated to by menu File > Open

2015-01-16 Thread Ken Thomases
On Jan 16, 2015, at 3:53 AM, Jerry Krinock wrote: > Also, I’d forgotten about -[NSSavePanel setDirectoryURL:]. TextEdit does not > invoke this method, so that does not explain the behavior. And yes I agree > that overriding both -runModalOpenPanel:forTypes: and > -beginOpenPanel:forTypes:com

Re: Using NSArrayController with a complex, heterogeneous model

2015-01-16 Thread Jerry Krinock
> On 2015 Jan 16, at 20:58, Rick Mann wrote: > > A "Part" in my app has a set of geometric primitives, and a set of labels > (both have a common base class). These are two separate sets (arrays) on the > part. But when editing the part, they can each be clicked on and edited. I > want to use

Using NSArrayController with a complex, heterogeneous model

2015-01-16 Thread Rick Mann
I'm working on a specialized CAD program with a fairly complicated model, not using Core Data. The data is hierarchical in nature, but not homogeneously. A "Part" in my app has a set of geometric primitives, and a set of labels (both have a common base class). These are two separate sets (arrays

performBatchUpdates: + removeObjectAtIndex: = EXC_BAD_ACCESS

2015-01-16 Thread Josh Avant
Hi everyone, I'm getting an EXC_BAD_ACCESS from my specific combination of performBatchUpdates: and removeObjectAtIndex:. The application is within a framework I'm developing. The framework has a Mediator object, and multiple Manager dependencies. The Mediator combines input from all of the Manag

Re: Directory navigated to by menu File > Open

2015-01-16 Thread Jerry Krinock
Just to clarify … this thread is about code, not about design. The appropriate initial directory offered by File > Open under various conditions is a design decision. The answer may vary for different apps. This thread is about the code that you write, or don’t, after the design decision is m

RE: Directory navigated to by menu File > Open

2015-01-16 Thread Lee Ann Rucker
On 16 Jan 2015, at 01:16, Jerry Krinock wrote: >> So, great, I thought, just override -currentDirectory in the >> NSDocumentController subclass for TextEdit, and I can make it go wherever I >> want to. > Have you thought about just setting the directoryURL of the NSOpenPanel? If you do that,

Re: GC / ARC question regarding screensavers under Mavericks

2015-01-16 Thread Sean McBride
On Sun, 4 Jan 2015 02:31:50 +0100, Gabriel Zachmann said: >Could it be that System Preferences does still expect screen savers to >be compiled with garbage collection? Probably. You can check if an app is built with GC using this:

Re: Directory navigated to by menu File > Open

2015-01-16 Thread Uli Kusterer
On 16 Jan 2015, at 01:16, Jerry Krinock wrote: > So, great, I thought, just override -currentDirectory in the > NSDocumentController subclass for TextEdit, and I can make it go wherever I > want to. Have you thought about just setting the directoryURL of the NSOpenPanel? > But, no. Although

Re: Search for emails in Mail’s previous recipients list from MacOSX app

2015-01-16 Thread Uli Kusterer
On 15 Jan 2015, at 22:04, Steffen Andersen wrote: > I am currently working on a MacOSX app, where the user will be able to send > mails generated based on different user input. To help the user, when > writing an email address, it would be great, if it was possible to search in > the previous

Re: drawRect runs twice, bounds are changed in between

2015-01-16 Thread Uli Kusterer
On 15 Jan 2015, at 07:58, Quincey Morris wrote: > Putting those two ideas together leads to a better approach. Create the > bezier path once, relative to an arbitrary bounding rect — say 1000 x 1000. > (But any rect would do.) When you need to draw the path, set the CTM of the > context to sca

Re: Directory navigated to by menu File > Open

2015-01-16 Thread Jerry Krinock
Yes, I missed that NSNavLastRootDirectory default. That explains the magic. Also, I’d forgotten about -[NSSavePanel setDirectoryURL:]. TextEdit does not invoke this method, so that does not explain the behavior. And yes I agree that overriding both -runModalOpenPanel:forTypes: and -beginOpen