Re: View-based outline view problem

2014-07-11 Thread Shane Stanley
On 11 Jul 2014, at 4:34 pm, Ken Thomases wrote: > Have you connected the delegate outlet of your text view (field?)? Yes. On 11 Jul 2014, at 4:54 pm, Quincey Morris wrote: > 1. The delegate method ‘control:textShouldBeginEditing:’ seems like it’s > called too late. Presumably the selection

Re: View-based outline view problem

2014-07-11 Thread Shane Stanley
On 11 Jul 2014, at 5:24 pm, Shane Stanley wrote: >> I guess you could solve it with a NSTextField subclass that overrides >> becoming first responder. > > That's all I can think of. Well not quite. I'm already overriding keyDown: in the outline view to show QL previews, so it might be easier

Re: View-based outline view problem

2014-07-11 Thread Quincey Morris
On Jul 11, 2014, at 00:24 , Shane Stanley wrote: > Just seems a lot of work for something that doesn't strike me as an uncommon > need. In such a case, it’s also worth re-considering your UI at a higher level. I wonder, for example, whether there’s an alternative that uses *two* text fields.

Re: Cocoa-dev Digest, Vol 11, Issue 374

2014-07-11 Thread Shane Stanley
On 11 Jul 2014, at 7:44 am, João Varela wrote: > Ithas been officially declared by Apple that cell-based NSOutlineView¹s and > NSTableView's are deprecated. Would you care to point to where? I'm not arguing, but you wouldn't think so from the documentation. I see: "NSCell-based tables continue

Re: View-based outline view problem

2014-07-11 Thread Shane Stanley
On 11 Jul 2014, at 5:44 pm, Quincey Morris wrote: > In such a case, it’s also worth re-considering your UI at a higher level. > > I wonder, for example, whether there’s an alternative that uses *two* text > fields. Put the file name in the ‘textField’ outlet field, and put the > extension in

Re: View-based outline view problem

2014-07-11 Thread Ken Thomases
On Jul 11, 2014, at 2:24 AM, Shane Stanley wrote: > FWIW, in my cell-based version I used > textView:willChangeSelectionFromCharacterRange:toCharacterRange: in my > outline view subclass. But that no longer seems to get called. In general, an NSCell is owned by a control (instance of some subc

Re: awakeFromNib multiple objects - all connected?

2014-07-11 Thread Uli Kusterer
On 06 Jul 2014, at 08:54, Roland King wrote: > After awakeFromNib all the outlets are connected except for those to subviews > of the UIViewController's view, they remain nil until after viewDidLoad. > Other top-level object outlets are connected, but not the view nor its > subviews. I always f

Re: View-based outline view problem

2014-07-11 Thread Shane Stanley
On 11 Jul 2014, at 6:37 pm, Ken Thomases wrote: > In general, an NSCell is owned by a control (instance of some subclass of > NSControl). An NSCell uses the field editor, an instance of NSText or a > subclass (usually an NSTextView or subclass, more specifically), to handle > the actual editi

Re: Issue with -[NSOutlineView autosaveExpandedItems]

2014-07-11 Thread Bill Cheeseman
On Jul 10, 2014, at 4:57 PM, Ken Thomases wrote: > Are the items that result from unarchiving the persistent object the same > items as your data source returns via -outlineView:child:ofItem:? I believe > they have to be the same by pointer identity, not just equal as by -isEqual:. They are

Re: View-based outline view problem

2014-07-11 Thread Bill Cheeseman
On Jul 11, 2014, at 2:54 AM, Quincey Morris wrote: > I guess you could solve it with a NSTextField subclass that overrides > becoming first responder. Or is there a more direct solution, do you think? Yes, that's exactly what I do, and it works. Override -[NSResponder becomeFirstResponder].

Re: awakeFromNib multiple objects - all connected?

2014-07-11 Thread Roland King
> On 11 Jul 2014, at 5:33 pm, Uli Kusterer wrote: > > On 06 Jul 2014, at 08:54, Roland King wrote: >> After awakeFromNib all the outlets are connected except for those to >> subviews of the UIViewController's view, they remain nil until after >> viewDidLoad. Other top-level object outlets are

Re: Cocoa-dev Digest, Vol 11, Issue 374

2014-07-11 Thread Yingshen Yu
Hi Shane, It's in the 10.10 AppKit release notes. Also WWDC session "What's new in Cocoa" has a fe slides. -Jonny Shane Stanley 于2014年7月11日星期五写道: > On 11 Jul 2014, at 7:44 am, João Varela > wrote: > > > Ithas been officially declared by Apple that cell-based NSOutlineView¹s > and > > NSTableVi

Re: Cocoa-dev Digest, Vol 11, Issue 374

2014-07-11 Thread Shane Stanley
On 11 Jul 2014, at 9:01 pm, Yingshen Yu wrote: > It's in the 10.10 AppKit release notes. Also WWDC session "What's new in > Cocoa" has a fe slides. Thanks. -- Shane Stanley ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not p

Re: Issue with -[NSOutlineView autosaveExpandedItems] - SOLVED

2014-07-11 Thread Bill Cheeseman
On Jul 10, 2014, at 4:20 PM, Bill Cheeseman wrote: > How can I make an outline view reinstate the expanded and collapsed state of > its rows across application launches? I finally realized that older code in my -awakeFromNib method was undoing everything that the datasource method -outlineVi

[NSDictionary objectForKey] crash on x64

2014-07-11 Thread Cosmin Apreutesei
Hi, I have a strange problem. I am using C and the objc runtime on OSX 10.9.3 to get a value from a NSDictionary. The objectForKey method returns an invalid pointer on x64 (not NULL, but the same address 0x937 for _any_ valid key), but works fine on i386. I attached a small test case to show th

Re: [NSDictionary objectForKey] crash on x64

2014-07-11 Thread Scott Ribe
On Jul 11, 2014, at 6:56 AM, Cosmin Apreutesei wrote: > The objectForKey method returns an invalid pointer on x64 (not NULL, > but the same address 0x937 for _any_ valid key), but works fine on > i386. Odds are, your dictionary is no longer there because it was dealloc'd. The fact that you did

Re: [NSDictionary objectForKey] crash on x64

2014-07-11 Thread Bavarious
On 11 Jul 2014, at 09:56, Cosmin Apreutesei wrote: > Hi, > > I have a strange problem. > > I am using C and the objc runtime on OSX 10.9.3 to get a value from a > NSDictionary. > > The objectForKey method returns an invalid pointer on x64 (not NULL, > but the same address 0x937 for _any_ valid

Re: View-based outline view problem

2014-07-11 Thread Shane Stanley
In case anyone's following along, I followed Ken's suggestion and made a subclass of NSTextField, and moved my textView:willChangeSelectionFromCharacterRange:toCharacterRange: delegate method there. I also followed Bill's suggestion of overriding becomeFirstResponder so that I could disallow

Re: [NSDictionary objectForKey] crash on x64

2014-07-11 Thread Cosmin Apreutesei
Hi Bavarious, Thanks a lot for the links and explanation. That was very helpful. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)l

Re: Converting Database to Core Data

2014-07-11 Thread Rick Aurbach
On Jul 11, 2014, at 1:34 AM, cocoa-dev-requ...@lists.apple.com wrote: > Message: 2 > Date: Thu, 10 Jul 2014 15:00:32 -0500 > From: William Squires > To: Cocoa Developers > Subject: Converting database to Core Data > Message-ID: > Content-Type: text/plain; charset=us-ascii > > I'm trying to co

Re: Issue with -[NSOutlineView autosaveExpandedItems] - SOLVED

2014-07-11 Thread Lee Ann Rucker
On Jul 11, 2014, at 5:35 AM, Bill Cheeseman wrote: > > > 4. In -awakeFromNib or equivalent, set up the initial expanded/collapsed > state of rows in the outline view only once, at first launch on a given > computer. Thereafter, leave it to the datasource methods to expand or > collapse the o

Re: View-based outline view problem

2014-07-11 Thread João Varela
> >On 11 Jul 2014, at 7:44 am, João Varela wrote: > >>Ithas been officially declared by Apple that cell-based NSOutlineView¹s >>and >>NSTableView's are deprecated. > >Would you care to point to where? I'm not arguing, but you wouldn't think >so from the documentation. I see: "NSCell-based tables

Re: Issue with -[NSOutlineView autosaveExpandedItems] - SOLVED

2014-07-11 Thread Bill Cheeseman
On Jul 11, 2014, at 3:10 PM, Lee Ann Rucker wrote: > On Jul 11, 2014, at 5:35 AM, Bill Cheeseman wrote: > >> 4. In -awakeFromNib or equivalent, set up the initial expanded/collapsed >> state of rows in the outline view only once, at first launch on a given >> computer. Thereafter, leave it to

Re: Issue with -[NSOutlineView autosaveExpandedItems] - SOLVED

2014-07-11 Thread Gary L. Wade
On 7/11/2014, 1:29 PM, "Bill Cheeseman" wrote: > And I've discovered another difficulty, although I think I can handle it. Sounds like it’s time to update Cocoa Recipes to a 3rd edition to fully share these nuggets. -- Gary L. Wade http://www.garywade.com/ ___

LSUIElement, NSStatusItem, and NSSearchField

2014-07-11 Thread Lee Ann Rucker
Questions on this date back to 2003, so I've tried a lot of things. I have an LSUIElement app, with an NSStatusItem and NSSearchField, and I'd much rather be using a menu item with a custom subview rather than showing a window when the status item gets clicked, because there's no way for the men

Re: LSUIElement, NSStatusItem, and NSSearchField

2014-07-11 Thread Jerry Krinock
Lee Ann, I have a similar requirement in my apps, and settled on adding a menu item titled “Search”. When user clicks “Search”, the menu disappears and a tiny window with a search field pops up. It would be nice to have a search field in the menu (like the standard “Help” menu does), but as yo