Escape in NSTableView cell

2011-02-07 Thread Ivan C Myrvold
I have developed an application with a table view and text edit cell. When I press escape from a table view cell, I want the cell to lose focus and end editing. Instead I get a list of words in the cell. See picture at http://www.myrvold.org/cocoa/images/editcell_escape.png How can I avoid

Need help sorting with NSSortDescriptor and/or/NSPredicate (Core Data)

2011-02-07 Thread Michael Crawford
I'm trying to implement a feature where I sort a cross-section of music from multiple genres with up to two different keys, where the items with a genre matching the first key appear first in the collection and items with a genre matching the second key appear after the first group in the

Re: Need help sorting with NSSortDescriptor and/or/NSPredicate (Core Data)

2011-02-07 Thread Ken Thomases
On Feb 7, 2011, at 8:56 AM, Michael Crawford wrote: I'm trying to implement a feature where I sort a cross-section of music from multiple genres with up to two different keys, where the items with a genre matching the first key appear first in the collection and items with a genre matching

NSDocument Question

2011-02-07 Thread Bruce Cresanta
Hello, I have two types of NSDocument. One of them only ever needs to be active one at a time (No duplicates). How do I check to see if the window is open first and make it key, and if it is not open already, open it once? Thanks, Bruce

Re: Escape in NSTableView cell

2011-02-07 Thread Dave Reed
On Feb 7, 2011, at 9:49 AM, Ivan C Myrvold wrote: I have developed an application with a table view and text edit cell. When I press escape from a table view cell, I want the cell to lose focus and end editing. Instead I get a list of words in the cell. See picture at

Re: Debugging Allocations. Was:NSUndoManager

2011-02-07 Thread Charles Srstka
On Feb 6, 2011, at 9:18 PM, Jerry Krinock wrote: On 2011 Feb 06, at 07:44, Charles Srstka wrote: Object Allocations, with “Record Reference Counts” checked, will let you choose an object and show exactly where and when it was allocated, deallocated, retained, released, and even

Re: Printing Appears Very Small in Lower-Left Corner of Page

2011-02-07 Thread Raleigh Ledet
Gerry, File a radar. Include the file or a sample project or whatever you can to help us duplicate. If this is a Cocoa bug, then you should be able to duplicate with a small sample app pretty quickly. -raleigh On Jan 18, 2011, at 5:42 PM, Gerry Beggs wrote: Just to follow-up (and clarify)

Re: Composing an NSImage to print

2011-02-07 Thread Raleigh Ledet
Sorry to be so late to the party. What Ken suggested will work. But generally, watermarks, header, and footers are drawn via your own -drawPageBorderWithSize: method.

Re: NSDocument Question

2011-02-07 Thread Quincey Morris
On Feb 7, 2011, at 07:37, Bruce Cresanta wrote: I have two types of NSDocument. One of them only ever needs to be active one at a time (No duplicates). How do I check to see if the window is open first and make it key, and if it is not open already, open it once? What do you mean

Re: Memory management about async object

2011-02-07 Thread ico
Hi All, What if the handler retain itself, and then will perform some NSURLConnection tasks, that will async download some data, and receive some messages as a delegate by implementing connection:didReceiveResponse connection:didReceiveData connection:didFailWithError connection:didFinishLoading

Re: NSDocument Question

2011-02-07 Thread Bruce Cresanta
Ii have two subclasses of NSDocument. One of the subclasses only ever needs one instance window. How do I query NSWindowController for the open window, and if that fails, create it. Sorry for the confusion. Bruce On Feb 7, 2011, at 10:54 AM, Quincey Morris wrote: On Feb 7, 2011, at

NSDrawer dealloc causes kCGErrorIllegalArgument

2011-02-07 Thread James Walker
I have a dialog with a drawer, and when the dialog closes, my console log contains these error messages: Error: kCGErrorIllegalArgument: _CGSFindSharedWindow: WID 583 Error: kCGErrorIllegalArgument: CGSGetWindowTags: Invalid window 0x247 I set a breakpoint at CGErrorBreakpoint, and when this

Re: NSDocument Question

2011-02-07 Thread Sherm Pendley
On Mon, Feb 7, 2011 at 2:54 PM, Bruce Cresanta cresa...@me.com wrote: Ii have two subclasses of NSDocument. One of the subclasses only ever needs one instance window. How do I query NSWindowController for the open window, and if that fails, create it. Sorry for the confusion. Override

Re: NSDocument Question

2011-02-07 Thread Quincey Morris
On Feb 7, 2011, at 11:54, Bruce Cresanta wrote: Ii have two subclasses of NSDocument. One of the subclasses only ever needs one instance window. How do I query NSWindowController for the open window, and if that fails, create it. Sorry for the confusion. Well, sorry but I'm still

Re: Escape in NSTableView cell

2011-02-07 Thread Kyle Sluder
On Mon, Feb 7, 2011 at 8:05 AM, Dave Reed davel...@mac.com wrote: See this: http://www.cocoabuilder.com/archive/cocoa/176709-esc-to-cancel-editing-in-tableview.html Subclassing NSTableView and overriding cancelOperation appears to work. I don't know if there's a better way though. I'm not

Re: NSDrawer dealloc causes kCGErrorIllegalArgument

2011-02-07 Thread Greg Parker
On Feb 7, 2011, at 12:10 PM, James Walker wrote: I have a dialog with a drawer, and when the dialog closes, my console log contains these error messages: Error: kCGErrorIllegalArgument: _CGSFindSharedWindow: WID 583 Error: kCGErrorIllegalArgument: CGSGetWindowTags: Invalid window 0x247 I

Core Data bindings question

2011-02-07 Thread Darren Wheatley
Hi, I have a Core Data app that displays data in a tableView with each column bound to a field in a core data entity. One field is called active, and is of type BOOL I box the BOOL for insertion into the Core Data store using [NSNumber numberWithBool]; In the TableView I would like to bind the

Re: Printing Appears Very Small in Lower-Left Corner of Page

2011-02-07 Thread Gerry Beggs
Thanks Raleigh. I discovered a work-around. But there does appear to be a bug. This was difficult for me to test because I wasn't able to reproduce it (from a new document) on my machine. But I received a document created by a user on their machine which I was able to use to reproduce the