Re: Dissappearing textField string value

2012-05-13 Thread Graham Cox
On 14/05/2012, at 3:01 PM, Roland King wrote: > I'm confused. What's the method stringValue on theSudokuTextField? That's one > of your methods right as stringValue is a method on NSNumber AFAIK. What does > it do? > > You're setting the attributedStringValue and the getting the stringValue,

Re: Dissappearing textField string value

2012-05-13 Thread Roland King
I'm confused. What's the method stringValue on theSudokuTextField? That's one of your methods right as stringValue is a method on NSNumber AFAIK. What does it do? You're setting the attributedStringValue and the getting the stringValue, in what way are they related? On May 14, 2012, at 10:36

Dissappearing textField string value

2012-05-13 Thread Charlie Dickman
Good people, This one really has me stumped. Perhaps someone can help me out. In my program is the code... NSAttributedString *theAttributedString = [[NSAttributedString alloc ] initWithString: possibleString

[SOLVED] Re: KVO de-observation difficulties when closing a window

2012-05-13 Thread Graham Cox
Turns out the problem was more complicated than I first though, and I have solved it. -windowWillClose: is reliably called in all cases, whether or not the Save dialog gets involved. The problem was that I was setting up observation in my document's -awakeFromNib method, which as we know can b

Re: KVO de-observation difficulties when closing a window

2012-05-13 Thread Jamie Johnson
Observe NSWindowWillCloseNotification via NSNotificationCenter. You will get notified. The delegate should get the notification but it's possible the delegate is getting set nil prior. On May 13, 2012, at 6:18 PM, Graham Cox wrote: > This is proving a lot harder that I feel it should be. > >

KVO de-observation difficulties when closing a window

2012-05-13 Thread Graham Cox
This is proving a lot harder that I feel it should be. I am KVO observing the accessory view property of an NSRulerView, so that I can install different views into the accessory area when the standard text controls are removed. The ownership of the NSRulerView is quite complicated, as it's part

Re: multi-window document best practices?

2012-05-13 Thread mlist0...@gmail.com
On May 13, 2012, at 3:07 PM, Willeke wrote: > How to Subclass NSWindowController: The NSWindowController subclass instance > should be the File’s Owner for the nib... Thank you. I missed this, probably because I'm not actually subclassing NSWindowController. But it settles it as far as I'm con

Re: +stringWithContentsOfURL read-only?

2012-05-13 Thread Rick Mann
Hrm. Seems I only sometimes get that error when opening a file... On May 13, 2012, at 15:26 , Rick Mann wrote: > I'm using +stringWithContentsOfURL:encoding:error: to load the contents of a > file for simple parsing. Unfortunately, if that file is open somewhere else, > I get: > > Error Domain

+stringWithContentsOfURL read-only?

2012-05-13 Thread Rick Mann
I'm using +stringWithContentsOfURL:encoding:error: to load the contents of a file for simple parsing. Unfortunately, if that file is open somewhere else, I get: Error Domain=NSCocoaErrorDomain Code=257 "The file “Logs” couldn’t be opened because you don’t have permission to view it." UserInfo=0

Re: multi-window document best practices?

2012-05-13 Thread Willeke
Op 13 mei 2012, om 04:11 heeft mlist0...@gmail.com het volgende geschreven: > If it were important that nibs should be built differently for single and > multiple window cases, I'd think the docs would mention it someplace, but > they don't They do. The documentation of awakeFromNib says It i

Re: mutableBytes Creates Autoreleased Objects

2012-05-13 Thread Quincey Morris
On May 12, 2012, at 22:00 , Ken Thomases wrote: > Well, you're the one who asserted something very concrete about when the > interior pointer was deallocated. You were claiming that Andreas couldn't > have seen what he said he saw. My point is that in the absence of a contract > you can't be