Re: Dragging NSManagedObject subclass within app

2013-03-10 Thread Jerry Krinock
On 2013 Mar 10, at 20:24, Rick Mann wrote: > Core Data makes it egregiously difficult to get the NSManagedObject back from > the URI. I know it seems stupid and redundant, but, following the advice of others, I often add my own "uuid" attribute to my managed objects, so I can reference them

Re: Dragging NSManagedObject subclass within app

2013-03-10 Thread Graham Cox
On 11/03/2013, at 2:24 PM, Rick Mann wrote: > That's just so ugly, though. The pasteboard should just accept keyed objects, > like NSDictionary, precisely for this purpose, especially if you have to put > *something* on it. > > I tried everything I could think of to do this "right," including

Re: Dragging NSManagedObject subclass within app

2013-03-10 Thread Kyle Sluder
On Sun, Mar 10, 2013, at 08:24 PM, Rick Mann wrote: > > On Mar 10, 2013, at 20:16 , Graham Cox wrote: > > > Yes, just store the pointer somewhere that the source and destination can > > both access it. You don't even need the pasteboard, except perhaps to put a > > dummy item on it (I often us

Re: Dragging NSManagedObject subclass within app

2013-03-10 Thread Rick Mann
On Mar 10, 2013, at 20:16 , Graham Cox wrote: > Yes, just store the pointer somewhere that the source and destination can > both access it. You don't even need the pasteboard, except perhaps to put a > dummy item on it (I often use an empty string) to keep the drag manager > happy. Also use t

Re: Dragging NSManagedObject subclass within app

2013-03-10 Thread Graham Cox
On 11/03/2013, at 11:53 AM, Rick Mann wrote: > Is it possible to just pass a pointer to the object to the drag destination? Yes, just store the pointer somewhere that the source and destination can both access it. You don't even need the pasteboard, except perhaps to put a dummy item on it (

Re: Dragging NSManagedObject subclass within app

2013-03-10 Thread Rick Mann
On Mar 10, 2013, at 17:53 , Rick Mann wrote: > I'm trying to drag from one view in my app to another. The object being > dragged is an NSManagedObject that lives in one NSManagedObjectContext, and > the drag destination will instantiate a new NSManagedObject in a new > NSManagedObjectContext

Dragging NSManagedObject subclass within app

2013-03-10 Thread Rick Mann
I'm trying to drag from one view in my app to another. The object being dragged is an NSManagedObject that lives in one NSManagedObjectContext, and the drag destination will instantiate a new NSManagedObject in a new NSManagedObjectContext (which is not even in the same persistent store), and c

Re: Dragging from NSCollectionView in inactive window?

2013-03-10 Thread Rick Mann
On Mar 10, 2013, at 16:47 , Rick Mann wrote: > Hi. I have a library window with items in an NSCollectionView that I'd like > to be able to drag from without first making the window active. Is this > possible? > > I see I can set -[NSView acceptsFirstMouse:], but that will make it accept > al

Dragging from NSCollectionView in inactive window?

2013-03-10 Thread Rick Mann
Hi. I have a library window with items in an NSCollectionView that I'd like to be able to drag from without first making the window active. Is this possible? I see I can set -[NSView acceptsFirstMouse:], but that will make it accept all mouse clicks and then make the window active. I want Finder

Problem with using a Navigation Controller in Xcode

2013-03-10 Thread gary . gardner
I am using XCode 4.6 and created a project. I am using a Single View Application type of project and I drag a Navigation Controller to the StoryBoard. I added a DetailViewController of type UIViewController. I then click on the Root View Controller, look at the Identity Inspector and under Custo

Re: How to disable crash reporter temporarily

2013-03-10 Thread Ken Thomases
On Mar 9, 2013, at 10:21 PM, David Mirabito wrote: > I'm working on a application which links against some cocoa libs, so is a > cocoa app although not wrapped in a bundle. (The lib takes care of all the > cocoa-ishness internally so my app ends up being more or less cross > platform). > > Whenev

Re: NSImage TIFFRepresentation crashes

2013-03-10 Thread Markus Spoettl
On 3/10/13 2:07 PM, Mike Abdullah wrote: OK, I'll look into that, thanks. Since performance is not really a concern and if the implementation doesn't have any other weak spots that could cause legitimate trouble, it's a bit academic, though. The point of the original question was to find out if

NSCollectionView and key view loop

2013-03-10 Thread Martin Hewitson
Dear list, I've been struggling with this for hours and I think it really shouldn't be this hard, so I thought I'd post the problem. I have an app that contains an NSCollectionView. Each item in the collection view has three text fields. I have finally managed to get the first textfield to be

Re: NSImage TIFFRepresentation crashes

2013-03-10 Thread Mike Abdullah
On 10 Mar 2013, at 13:04, Markus Spoettl wrote: > On 3/10/13 1:09 PM, Mike Abdullah wrote: >>> NSData *tiff = [image TIFFRepresentation]; >>> NSBitmapImageRep *bmprep = [NSBitmapImageRep imageRepWithData:tiff]; >>> NSDictionary *props = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber >>> n

Re: NSImage TIFFRepresentation crashes

2013-03-10 Thread Markus Spoettl
On 3/10/13 1:09 PM, Mike Abdullah wrote: NSData *tiff = [image TIFFRepresentation]; NSBitmapImageRep *bmprep = [NSBitmapImageRep imageRepWithData:tiff]; NSDictionary *props = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:NO], NSImageInterlaced, nil]; NSData *pngData = [bmpr

Re: NSImage TIFFRepresentation crashes

2013-03-10 Thread Markus Spoettl
On 3/10/13 12:50 PM, Graham Cox wrote: On 10/03/2013, at 7:12 PM, Markus Spoettl mailto:ms_li...@shiftoption.com>> wrote: Why does it conform to NSCoding if it's not safe to use? I'm not sure I said it wasn't safe, just that it wasn't a good idea. OK, that's true. An NSImage can contain

Re: NSImage TIFFRepresentation crashes

2013-03-10 Thread Mike Abdullah
On 10 Mar 2013, at 08:05, Markus Spoettl wrote: > On 3/10/13 1:55 AM, Mike Abdullah wrote: > > Well that exception suggests you have a truly giant image on your hands. > > Perhaps there's enough memory to do some work with it, but not all. > > I was trying to say that the framework appears to b

Re: NSImage TIFFRepresentation crashes

2013-03-10 Thread Graham Cox
On 10/03/2013, at 7:12 PM, Markus Spoettl wrote: > Why does it conform to NSCoding if it's not safe to use? I'm not sure I said it wasn't safe, just that it wasn't a good idea. An NSImage can contain multiple representations of the same image, often in highly expanded forms, e.g. the actual

Re: NSImage TIFFRepresentation crashes

2013-03-10 Thread Markus Spoettl
On 3/10/13 3:51 AM, Graham Cox wrote:> On 10/03/2013, at 5:08 AM, Markus Spoettl > > wrote: > >> and serializes the image without problem > > > Do you mean you are archiving the NSImage itself? That is rarely a good > idea, so might be causing the image to be dear

Re: NSImage TIFFRepresentation crashes

2013-03-10 Thread Markus Spoettl
On 3/10/13 1:55 AM, Mike Abdullah wrote: > Well that exception suggests you have a truly giant image on your hands. > Perhaps there's enough memory to do some work with it, but not all. I was trying to say that the framework appears to be confusing the size. The image itself is being serialized