nsoutlineview

Getting error “libobjc.A.dylib`objc_assign_strongCast_non_gc(objc_object*, objc_object**)”

我们两清 提交于 2019-12-24 22:19:44
问题 I have a huge set of data, those are displayed in a customized NSOutlineView . Sometime my app gets crashed and gives me this error, while running in Xcode: libobjc.A.dylib objc_assign_strongCast_non_gc(objc_object*, objc_object**)` Any idea about this one? Your replies would certainly help me to figure it out. EDIT: What I have tried so far: I have put all exception breakpoints and enabled NSZombieEnabled . But is never caught. I have use Binding to populate the NSOutlineView . The array

NSOutlineView spring load expanded item

拈花ヽ惹草 提交于 2019-12-24 21:23:40
问题 I have a subclass of NSOutlineView implementing the NSSpringLoadingDestination protocol. Everything works great. The only issue is when I try to drag an item over an already expanded item, spring loading never activates. The NSOutlineViewDelegateProtocol method outlineView(_:shouldExpandItem:) returns true. The method outlineView(_:validateDrop:proposedItem:proposedChildIndex:) returns a valid NSDragOperation. The expanded item becomes highlighted when I drag over it. And the

Change NSView background color when window has focus

ε祈祈猫儿з 提交于 2019-12-24 00:39:51
问题 I have noticed when an apps window contains an Outline view (such as XCode) it changes color when that window is in focus. With XCode for example, if the window is current then the outline view has a blueish background, if it looses focus it goes grey, Can anyone help me to replicate this? I presume its something to do with drawRect: but can only manage to get the color to change when the window loads. Maybe its a built in function and I'm just missing something? 回答1: All you have to do in

Drag and drop from within a NSOutlineView

孤人 提交于 2019-12-22 04:35:23
问题 I'm trying to figure out how to implement drag and drop from within a NSOutlineView to itself. For example, I want the user to be able to reorder and nest and re-nest the items in the NSOutlineView, but I don't need to be able to drag items from any other source (like files or from another view). All the examples I can find deal with dragging item into the NSOutlineView, not just within itself and seem overly complex. I assume this is possible. Can someone point be to some docs that deal with

How do i make a simple view-based NSOutlineView?

不羁的心 提交于 2019-12-20 12:27:41
问题 For learning purposes i would like to convert a cell-based NSOutlineView to a view-based one, basically i would like the following: instead of a normal cell, i'd like an 'image and text table cell view' the image can be the stock NSApplicationIcon and the text can just be 'hello world' :) I'd like to do this without using bindings and NSTreeController Here is the 'worlds simplest NSOutlineView' example http://www.cocoasteam.com/Cocoa_Steam/Worlds_Simplest_Demo.html I wonder if someone could

NSOutlineView spring loading exits over NSImageView but not NSButton

落爺英雄遲暮 提交于 2019-12-18 09:52:10
问题 I have an NSOutlineView subclass that implements the NSSpringLoadingDestination. The outline view is populated with NSTableCellViews. Each table cell view has an NSTextField and NSImageView. It looks just like the name column in the Finder window: icon and text. When I drag a row over the text field in another row everything works fine. When the cursor goes over the NSImageView, however, the spring loading exits. The outline view also loses the highlight for that row. If I replace the image

NSOutlineView spring loading exits over NSImageView but not NSButton

最后都变了- 提交于 2019-12-18 09:52:09
问题 I have an NSOutlineView subclass that implements the NSSpringLoadingDestination. The outline view is populated with NSTableCellViews. Each table cell view has an NSTextField and NSImageView. It looks just like the name column in the Finder window: icon and text. When I drag a row over the text field in another row everything works fine. When the cursor goes over the NSImageView, however, the spring loading exits. The outline view also loses the highlight for that row. If I replace the image

Subclassing NSOutlineView [closed]

柔情痞子 提交于 2019-12-13 11:30:26
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . How would you Subclass an NSOutlineView? 回答1: Firstly, before you subclass an object, you should ask yourself "do I need to do this?". Subclassing is a more complex way of interacting and extending the functionality of other classes, so you should make sure that what you are trying to achieve cannot easily be

NSOutlineView and Core Data 1 → Many Relationships

 ̄綄美尐妖づ 提交于 2019-12-13 05:35:17
问题 I have a Core Data model that supports a 1 → Many relationship (1 Folder to many Phrases). At the moment I'm just displaying the Phrases on a flat NSTableView using Core Data Bindings to a NSArrayController to glue everything together - this is working happily. I'm trying to experiment with an NSOutlineView to achieve the same result but showing the folders as well. I've tried a similar binding structure that I'm already using with the NSTableView but I'm not making any headway. What steps

Is it possible to bind an NSTreeController to an NSOutlineViewDataSource?

試著忘記壹切 提交于 2019-12-13 04:09:22
问题 I have some hierarchical data model that I'd like to present in an NSOutlineView. I'm binding a tree controller to the outline view to provide data and to handle selection and binding to other views. However, I only want to show only part of the data in my model to the outline view. (Each object in my hierarchy has an array of child objects, but I'd only like some of these child objects to appear as child nodes of the node in the tree.) I wish I could just attach a filter predicate to the