nsoutlineview

NSOutlineView crash on Mac OS versions below 10.12 as 'stronglyReferencesItems' set to 'false' by default

两盒软妹~` 提交于 2020-04-17 22:49:05
问题 My app has an outline view which get frequent updates from server. Whenever I get an update I reload outline view. I do multiple operation with outline at the same time like showing some buttons on mouse over, expand/collapse items. For these operations I get item from outline view with NSOutlineView.item(atRow:) The issue is, at random scenarios my app is getting crashed with EXC_BAD_ACCESS (SIGSEGV) in areas where NSOutlineView internally calls NSTableView delegate methods on OS versions

NSOutlineView with Drag and Drop

心不动则不痛 提交于 2020-01-17 03:22:26
问题 I read the other post here on Outlineviews and DND, but I can't get my program to work. At the bottom of this post is a link to a zip of my project. Its very basic with only an outlineview and button. I want it to receive text files being dropped on it, but something is wrong with my code or connections. I tried following Apple's example code of their NSOutline Drag and Drop, but I'm missing something. 1 difference is my program is a document based program and their example isn't. I set the

NSOutlineView row indexes changes when expanding item

孤街浪徒 提交于 2020-01-17 02:15:12
问题 Say I have a NSTableView (for example, a ) and a NSOutlineView (for example, b ). In the datasource of a I'm trying to get the parent item of all the selected items of b . In the row no. rowIndex of a I would like to have the rowIndex th selected item of b and I would like to concatenate this string to the name of the parent of this item. For example, a : 1 and 1.1 2 And b : 1 1.1 (selected) 2 (selected) 3 This is - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:

NSOutlineView example

我是研究僧i 提交于 2020-01-10 13:37:19
问题 Please, could you give a simple complete example of Cocoa application with NSOutlineView with hierarchical data representation not so ambiguous like NSOutlineView and NSTreeController example . Thanks! 回答1: This example uses a simple two layer hierarchy of two parents Foo and Bar who each have two kids, Foox, Fooz and Barx, Barz respectively, the outline view is the default one with just two columns and the identifier of the second column is set to "children". NSDictionary *firstParent = @{@

NSOutlineView example

我的梦境 提交于 2020-01-10 13:37:10
问题 Please, could you give a simple complete example of Cocoa application with NSOutlineView with hierarchical data representation not so ambiguous like NSOutlineView and NSTreeController example . Thanks! 回答1: This example uses a simple two layer hierarchy of two parents Foo and Bar who each have two kids, Foox, Fooz and Barx, Barz respectively, the outline view is the default one with just two columns and the identifier of the second column is set to "children". NSDictionary *firstParent = @{@

Using NSOutlineView as a file browser, starting from a given directory

徘徊边缘 提交于 2020-01-02 21:05:12
问题 I've been following this tutorial for using NSOutlineView as a hierarchical file browser: https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/OutlineView/Articles/UsingOutlineDataSource.html I used all the code in the tutorial and it worked. However, I then tried to call initWithPath: with a path other than / and it doesn't work: the fullPath of the top item (i.e. the folder specified in initWithPath ) is just the name of the folder, and the children method of the

Subclass NSTableRowView for NSOutlineView

女生的网名这么多〃 提交于 2020-01-02 05:31:15
问题 If you have a tableView and want to use a subclass of NSTableRowView, you can use the delegate function - (NSTableRowView *)tableView:(NSTableView *)tableView rowViewForRow:(NSInteger)row. Any ideas of how I can do this with an NSOutlineView (without subclassing NSOutlineView)? 回答1: The NSOutlineView has this delegate method: (NSTableRowView *)outlineView:(NSOutlineView *)outlineView rowViewForItem:(id)item that serves the same purpose for an outline view. I don't see this method in my docs

Why is my NSOutlineView datasource nil?

ぐ巨炮叔叔 提交于 2019-12-31 05:45:10
问题 This is a follow-on question from my previous one relating to why my managedObjectContext was returning to nil. I thought the direction of the question would get buried in the old one. I now get my mangedObjectContext to not return nil and when performing [outlineView reloadData] , nothing at all happens to my outlineView. I tried selectively removing parts of the code that are intended to update the outlineView to see if anything changes and the answer is no. I've since found out (after I

How to program a NSOutlineView?

允我心安 提交于 2019-12-30 03:35:06
问题 I am having trouble creating a NSOutlineView in Xcode 8 (Swift 3). I have a plist file with some information that I would like to present in an OutlineView. The plist file looks as following (example): Root Dictionary *(1 item) Harry Watson Dictionary *(5 items)* name String Harry Watson age Int 99 birthplace String Westminster birthdate Date 01/01/1000 hobbies Array *(2 items)* item 0 String Tennis item 1 String Piano The OutlineView should look pretty similar, like follow: name Harry Watson

How to get the source lists selection highlight to use the Dark Vibrancy appearance in OS X 10.10?

回眸只為那壹抹淺笑 提交于 2019-12-30 00:37:47
问题 In OS X 10.10 source lists seem to use the light vibrancy appearance. In the Finder (and in some other third party applications, Things.app for example) the selected item in the source list is indicated by a dark vibrancy appearance. For example, see the Desktop row in the image below. How can I replicate this behaviour? Do I need to use the delegate methods to specify the table row view, -outlineView:rowViewForItem: and attempt custom drawing myself or is there a more straight forward