Re: NSTextView redraw while resigning first responder (sequel)

2010-08-09 Thread vincent habchi
Le 9 août 2010 à 19:03, Kyle Sluder a écrit : > Oops. We have custom analogues of NSTextFieldCell that allow us to > specify an NSTextStorage in -setObjectValue:. I forgot that > NSTextFieldCell doesn't let you do this; it always uses its own layout > manager. > > I believe you will need to imple

Re: NSTextView redraw while resigning first responder (sequel)

2010-08-09 Thread Kyle Sluder
On Mon, Aug 9, 2010 at 8:03 AM, vincent habchi wrote: > Kyle, > > sorry for disturbing you once more. > > You suggested I use a custom layout manager for the NSTextField editor. > However, I see no way to set a layout editor for a NSTextField – I tried to > attach a custom field editor, but it f

Re: NSTextView redraw while resigning first responder

2010-08-07 Thread vincent habchi
Thanks again Kyle. Vincent PS: Since NSText is a superclass of NSTextView, it would not break compatibility to change the return type to NSTextView anyhow, no? Unless some method is overriden...___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) P

Re: NSTextView redraw while resigning first responder

2010-08-07 Thread Kyle Sluder
On Sat, Aug 7, 2010 at 10:15 PM, vincent habchi wrote: > By the way, can anybody explain me why the call [window fieldEditor: > forObject:] returns a NSText *, while the documentation explicitly states it > returns a NSTextView * (so I had to cast it to get access to the > -layoutManager method

Re: NSTextView redraw while resigning first responder

2010-08-07 Thread vincent habchi
Le 7 août 2010 à 22:35, Kyle Sluder a écrit : > Please describe your text system setup. Is it possible your custom glyph > generator is only being used for the field editor, not for the text field's > layout manager? Of course Kyle, you're a genius! I wonder what this list would be without your

Re: NSTextView redraw while resigning first responder

2010-08-07 Thread Kyle Sluder
On Aug 7, 2010, at 1:25 PM, vincent habchi wrote: > > But, when my NSTextField resigns first responder status, it seems the > NSAttributedText is redrawn without going through the normal process (the > "standard" layout process chain): the keywords go back to lowercase and I > don't see any N

NSTextView redraw while resigning first responder

2010-08-07 Thread vincent habchi
Hi there again, sorry for being a bit too verbose tonight (it's 10:18 pm here). Just something strange, or something I misunderstood. I have an NSTextField that serves as a semi-assisted SQL editor: it colors keywords and operators, and also changes their glyphs on-the-fly to make them look uppe