Re: Surprise: -[NSInvocation retainArguments] also Autoreleases them

2009-08-01 Thread Ken Thomases
On Aug 1, 2009, at 1:42 AM, Jerry Krinock wrote: So I decided to -retainArguments, and presumed that this meant I was supposed to release the target and arguments when I was done with them. As you've discovered, no, you're not supposed to do that. You have not retained the target and arg

Re: Core Data App With Auxiliary Panel

2009-08-01 Thread Chris Hanson
The below is incorrect. Key-Value Coding (and therefore Key-Value Observing and bindings) will always use a method if one is present. -- Chris On Jul 31, 2009, at 8:33 PM, Kyle Sluder wrote: Because you have a managedObjectContext ivar, you never change its value so it defaults to nil, a

Disabling Undo in Core Data

2009-08-01 Thread Squ Aire
I want to disable undo in Core Data. So far I can think of two ways to do that. 1) In awakeFromNib, call either [[self managedObjectContext] setUndoManager:nil]; or [[[self managedObjectContext] undoManager] disableUndoRegistration]; This certainly works, but the problem with this is

Re: Surprise: -[NSInvocation retainArguments] also Autoreleases them

2009-08-01 Thread Jerry Krinock
Thank you, Ken. Yes, your explanation -- that the NSInvocation retains them as instance variables -- makes more sense than mine. I submitted Document Feedback that Apple make clear what they mean by "retain" in this method. ___ Cocoa-dev mailing

Re: Core Data App With Auxiliary Panel

2009-08-01 Thread Richard Somers
On Aug 1, 2009, at 12:28 AM, Quincey Morris wrote: You haven't said what you mean by an "auxiliary panel". It is an inspector panel. One panel for many documents. The panel is made visible with a menu selection which by the way currently works. Or, in all 3 cases, just pass the managed obj

Re: Core Data App With Auxiliary Panel

2009-08-01 Thread Richard Somers
On Aug 1, 2009, at 8:03 AM, Richard Somers wrote: How do you debug a binding? Troubleshooting Cocoa Bindings http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/Troubleshooting.html Richard ___ Cocoa-dev mailing list

Re: How to set the name of open-with application for a specific file?

2009-08-01 Thread Alexander Bokovikov
On 31.07.2009, at 21:41, MATSUMOTO Satoshi wrote: I want to do this programmatically. The direct answer to this question is very easy - it's impossible. Why? Take a look here: http://developer.apple.com/technotes/tn/tn2017.html#Section3 Nevertheless, if I understand it correctly, you ne

Re: incorrect checksum for freed object

2009-08-01 Thread kvic...@pobox.com
At 6:31 PM -0700 7/31/09, Shawn Erickson wrote: On Fri, Jul 31, 2009 at 3:39 PM, kvic...@pobox.com wrote: where interface and device are declared as follows: @property ( assign, nonatomic) IOUSBDeviceInterface300** device; @property ( assign, nonatomic) IOUSBInterfaceInterfac

Re: Core Data App With Auxiliary Panel

2009-08-01 Thread Richard Somers
On Aug 1, 2009, at 8:03 AM, Richard Somers wrote: The error message "Cannot perform operation without a managed object context" indicates the binding is not working. Upon further investigation I have discovered that my window controller -document method returns nil. So as far as the binding

Re: Core Data App With Auxiliary Panel

2009-08-01 Thread Quincey Morris
On Aug 1, 2009, at 07:03, Richard Somers wrote: It is an inspector panel. One panel for many documents. This is a crucial piece of information which changes the nature of the problem to be solved. You gotta tell us the relevant information up front. :) If I create the inspector panel in

Re: incorrect checksum for freed object

2009-08-01 Thread Scott Ribe
> i'm using pointer to pointer (sometimes called handles) because that > is what is required when using the usb aspects of the IOKit as > demonstated in apple's sample code. FYI, Ken's right. The IOUSB stuff is odd-looking. You have instance vars of type IOxxx**, and then pass the addresses of tho

Re: How to change focus ring color?

2009-08-01 Thread Joel Norvell
Hi Alexander, If your object is always the First Responder, that would account for its focus ring always being redrawn. There's a lot of good information available, but you have to look around a bit to find it. Googling for - cocoa draw focus ring - shows some good results. The 2005 thread,

Re: IPhone Textview question

2009-08-01 Thread Development
I left out a crucial bit of information not realizing it was crucial. I was using the NSURLConnection synchronous request every 4 seconds on the main thread. I noticed that in some circumstances I had a fairly regular lag spike. Almost timed to exactly 4 seconds, the time span of my ticker.

Re: incorrect checksum for freed object

2009-08-01 Thread kvic...@pobox.com
At 12:09 PM -0600 8/1/09, Scott Ribe wrote: > i'm using pointer to pointer (sometimes called handles) because that is what is required when using the usb aspects of the IOKit as demonstated in apple's sample code. FYI, Ken's right. The IOUSB stuff is odd-looking. You have instance vars of t

Re: Disabling Undo in Core Data

2009-08-01 Thread Jerry Krinock
On 2009 Aug 01, at 05:11, Squ Aire wrote: 1) disableUndoRegistration ... NSManagedObjectContextObjectsDidChangeNotification will stop being sent when the context changes! I'd call that a bug, at least in the documentation. It is implied in a roundabout way... "The notification is pos

RE: Disabling Undo in Core Data

2009-08-01 Thread Squ Aire
In fact, the NSManagedObjectContextObjectsDidChangeNotification is working nicely for my purposes, given that it is indeed being sent! So, solution 2) you seem to like. When I said "one day" I actually meant to say that I plan on supporting undo for some selected features in my app, espec

Re: Disabling Undo in Core Data

2009-08-01 Thread Quincey Morris
On Aug 1, 2009, at 12:38, Jerry Krinock wrote: On 2009 Aug 01, at 05:11, Squ Aire wrote: 2) Which brings me to the second option. Keep the undo stuff there so that the NSManagedObjectContextObjectsDidChangeNotification will properly be sent out, as I want. However, instead just get rid of

Re: Disabling Undo in Core Data

2009-08-01 Thread mmalc Crawford
On Aug 1, 2009, at 5:11 AM, Squ Aire wrote: 1) In awakeFromNib, call either [[self managedObjectContext] setUndoManager:nil]; or [[[self managedObjectContext] undoManager] disableUndoRegistration]; This certainly works, but the problem with this is that the NSManagedObjectContex

Re: How to change focus ring color?

2009-08-01 Thread Alexander Bokovikov
On 02.08.2009, at 0:14, Joel Norvell wrote: If your object is always the First Responder, that would account for its focus ring always being redrawn. As I've tested it with the code samples from your links, it's NOT the first resonder. I don't see any drawings if I surround the drawing

RE: Disabling Undo in Core Data

2009-08-01 Thread Squ Aire
Ah, it is interesting that you say this, because now suddenly I realize that the problem might be related to bindings (although I'm not sure). Please follow these simple steps to make a very simple test app that demonstrates my issue: 1) Create a new "Core Data Application" project in Xcode.

NSCollectionView and initWithCoder

2009-08-01 Thread gMail.com
Hi, I programmatically create a NSCollectionView and set my own prototype view containing my own objects. These objects are subclasses of NSView containing other subviews, for example I have a XXView object containing an NSTextView defined by the variable mTextView. Now when I get the several item

NSURLConnection performance on iPhone

2009-08-01 Thread Ben Lachman
Hi All: I'm working on a small iPhone project this weekend that among other things downloads some medium sized video files. To do this I set up a NSURLConnection and use an NSOutputStream to write the data to my apps' documents folder as it arrives. The only problem is that I'm seeing l

Re: How to change focus ring color?

2009-08-01 Thread Graham Cox
On 02/08/2009, at 7:05 AM, Alexander Bokovikov wrote: NSSetFocusRingStyle(NSFocusRingOnly); I may be wrong, but my understanding was that this sets up some sort of special mode in the graphics context that draws the focus ring as a special case. If you notice, the ring is not a simple so