Why get my constraints broken?

2012-04-10 Thread Gerriet M. Denkmann
I have a xib-file with an NSView (content view of a tab of an NSTabView) called TabTextView. Inside this TabTextView I have an NSScrollView (containing an NSTextView) called ScrollText which: - has a top vertical distance to it's superView (TabTextView) of 12 - has a height of 33 or more - has

Recursive call-back block

2012-04-10 Thread Mikkel Islay
Hello, The (prototype) code below updates a number of objects of a NSManagedObject-sublass (Progenitor) from a remote host. As the number of objects to update is unknown I would like to use a call-back passed to the updater class invoked by startParserWithObjectId: completionBlock: to recursiv

Re: How to bind to NSMutableArray that may contain zero objects?

2012-04-10 Thread Michael Crawford
The problem I'm trying solve is that I have a crashing bug in the UI when an underlying array managed by an NSArrayController contains zero objects. The controls bound to the array-controller include an NSPopUpButton, an NSTextField, and four NSButtons. -Michael On Apr 3, 2012, at 6:53 PM, Qu

How to set the foreground and background colors of selected text in a field editor (NSTextView)?

2012-04-10 Thread Michael Crawford
I've tried two different approaches. The first thing I tried was to make may app-delegate the delegate for my window and then implement -windowWillReturnFieldEditor:toObject:. - (void)awakeFromNib { _fieldEditor = [NSTextView new]; [_fieldEditor setFieldEditor:YES]; NSDictionar

Cannot autosave a TableView without headers

2012-04-10 Thread Gerriet M. Denkmann
I have an NSTableView which should NOT show headers ( so I deselected in Xcode 4.3.2 the Headers checkbox. But now it no longer autosaves it's data. Checked the Headers checkbox again - now it autosaves as expected. Why? What is the magic connection between showing headers and autosaving? Kin

Re: Recursive call-back block

2012-04-10 Thread Fritz Anderson
On 10 Apr 2012, at 9:13 AM, Mikkel Islay wrote: > Hello, > > The (prototype) code below updates a number of objects of a > NSManagedObject-sublass (Progenitor) from a remote host. As the number of > objects to update is unknown I would like to use a call-back passed to the > updater class invo

Re: How to bind to NSMutableArray that may contain zero objects?

2012-04-10 Thread Quincey Morris
On Apr 10, 2012, at 07:34 , Michael Crawford wrote: > The problem I'm trying solve is that I have a crashing bug in the UI when an > underlying array managed by an NSArrayController contains zero objects. The > controls bound to the array-controller include an NSPopUpButton, an > NSTextField,

Re: How to set the foreground and background colors of selected text in a field editor (NSTextView)?

2012-04-10 Thread Stephane Sudre
Interesting problem. I'm afraid one of the easier solutions is to use a NSTextView instead of a NSTextField. When you set the selectedAttributes of the field editor, I believe it will be forgotten as the field editor will try to mimick the way the text look like when not edited, (Sure the doc says

Re: How to set the foreground and background colors of selected text in a field editor (NSTextView)?

2012-04-10 Thread Kyle Sluder
On Apr 10, 2012, at 11:29 AM, Stephane Sudre wrote: > Allowing rich text, subclassing NSTextField and add some methods from > NSTextView did not work so far. Subclassing NSTextField and implemented -setUpFieldEditor didn't do the trick? --Kyle Sluder _

Re: How to set the foreground and background colors of selected text in a field editor (NSTextView)?

2012-04-10 Thread Stephane Sudre
With the delegate method, you get the appropriate NSTextView field editor. The issue is that you're not editing this NSTextView, you're editing the NSTextField. At least that's my take on this. On Tue, Apr 10, 2012 at 12:09 PM, Kyle Sluder wrote: > On Apr 10, 2012, at 11:29 AM, Stephane Sudre wr

Converting between property names?

2012-04-10 Thread Rick Mann
Are there functions provided in the Objective-C runtime to convert property names? For example, say I have a key name like "fooKey", and I want to get "FooKey", or the setter name "setFooKey" from it. I could do the name munging myself, but I wonder if there aren't edge cases. For example, "setU

Re: How to set the foreground and background colors of selected text in a field editor (NSTextView)?

2012-04-10 Thread Michael Crawford
My next move, I guess. Thanks, Kyle. -Michael On Apr 10, 2012, at 3:09 PM, Kyle Sluder wrote: > On Apr 10, 2012, at 11:29 AM, Stephane Sudre wrote: > >> Allowing rich text, subclassing NSTextField and add some methods from >> NSTextView did not work so far. > > Subclassing NSTextField and imp

Re: How to set the foreground and background colors of selected text in a field editor (NSTextView)?

2012-04-10 Thread Michael Crawford
Little confused by Stephane's comments. From what I've read, the text-field is swapped out with the field editor by the window containing the text-field. This happens when the text-field becomes the first-responder. So the actual control involved is an NSTextView instanced not an NSTextField

Re: Converting between property names?

2012-04-10 Thread Greg Parker
On Apr 10, 2012, at 1:49 PM, Rick Mann wrote: > Are there functions provided in the Objective-C runtime to convert property > names? For example, say I have a key name like "fooKey", and I want to get > "FooKey", or the setter name "setFooKey" from it. I could do the name munging > myself, but

Re: Converting between property names?

2012-04-10 Thread Lee Ann Rucker
On Apr 10, 2012, at 1:49 PM, Rick Mann wrote: > Are there functions provided in the Objective-C runtime to convert property > names? For example, say I have a key name like "fooKey", and I want to get > "FooKey", or the setter name "setFooKey" from it. I could do the name munging > myself, but

Re: Converting between property names?

2012-04-10 Thread Rick Mann
On Apr 10, 2012, at 15:09 , Lee Ann Rucker wrote: > > On Apr 10, 2012, at 1:49 PM, Rick Mann wrote: > >> Are there functions provided in the Objective-C runtime to convert property >> names? For example, say I have a key name like "fooKey", and I want to get >> "FooKey", or the setter name "s

Save PDF disabled in Print Dialog?

2012-04-10 Thread Rick Mann
I noticed just now that a Safari page has managed to disable, in the print dialog for the page, the Save as PDF, and other PDF options, but Save as Postcript and Fax PDF were still enabled. What's up with that? -- Rick ___ Cocoa-dev mailing list

Re: Save PDF disabled in Print Dialog?

2012-04-10 Thread Rick Mann
Ugh, NVM. The content was already PDF. On Apr 10, 2012, at 15:47 , Rick Mann wrote: > I noticed just now that a Safari page has managed to disable, in the print > dialog for the page, the Save as PDF, and other PDF options, but Save as > Postcript and Fax PDF were still enabled. > > What's up

Re: Converting between property names?

2012-04-10 Thread Jean-Daniel Dupas
Le 10 avr. 2012 à 23:40, Greg Parker a écrit : > On Apr 10, 2012, at 1:49 PM, Rick Mann wrote: >> Are there functions provided in the Objective-C runtime to convert property >> names? For example, say I have a key name like "fooKey", and I want to get >> "FooKey", or the setter name "setFooKey

window resizing advice

2012-04-10 Thread Rick C.
Hi, I have a small main window with a custom view that accepts drags, and once the drag is accepted I want it to resize larger and reveal a table view. In general I want to animate this but seems there might be a problem animating if the table view subview is already added? Should I: 1. Acc