nsoutlineview

How to print an NSOutlineView with NSVIew.printView

烂漫一生 提交于 2021-02-17 06:46:06
问题 I want to print an NSOutlineView. The view is a subview of a window on screen. I noticed the NSView api call printView. So I tried it in a simple minded fashion. In my AppDelegate I have a call: @IBAction func doPrint(_ sender: Any?) { globalOutlineCntrl?.outlineView.printView(self) } So with the window containing the outline on-screen, I issued the doPrint call. The outline on screen looks like this: The doPrint call seems to work, but prints this: Is there anyway to make this work? If not

Create new column cell on button click outlineview

本秂侑毒 提交于 2021-02-10 21:21:06
问题 I have an outlineview which displays list of data items. Attaching code and screenshot below. When I click on "Create New" button added to cell, I want to add a new item below selected cell.Any help? @IBAction func CreateFolderClicked(_ sender: Any) { let newMember = CubeData() let newIndex = selectedItemIndex let parent = foldersOutlineView.parent(forItem: foldersOutlineView.item(atRow: selectedRow)) if let parentTemp = parent as? CubeData{ let Temp = newMember.initWithNodeName(appName:

Create new column cell on button click outlineview

荒凉一梦 提交于 2021-02-10 21:16:58
问题 I have an outlineview which displays list of data items. Attaching code and screenshot below. When I click on "Create New" button added to cell, I want to add a new item below selected cell.Any help? @IBAction func CreateFolderClicked(_ sender: Any) { let newMember = CubeData() let newIndex = selectedItemIndex let parent = foldersOutlineView.parent(forItem: foldersOutlineView.item(atRow: selectedRow)) if let parentTemp = parent as? CubeData{ let Temp = newMember.initWithNodeName(appName:

NSOutlineView drag line stuck + blue border

早过忘川 提交于 2021-02-10 04:55:48
问题 I'd like a correct behaviour from the blue drag bar , and no blue rect when dragging. Do you know where is my mistake ? (as you can see, the blue bar is stuck in top, like in this topic : Little circle-line bar stuck at top of NSOutlineView when rearranging using drag and drop) import Cocoa class ViewController: NSViewController, NSOutlineViewDataSource, NSOutlineViewDelegate, NSPasteboardItemDataProvider { @IBOutlet weak var outlineView: NSOutlineView! let REORDER_PASTEBOARD_TYPE = "com.test

NSOutlineView drag line stuck + blue border

筅森魡賤 提交于 2021-02-10 04:54:09
问题 I'd like a correct behaviour from the blue drag bar , and no blue rect when dragging. Do you know where is my mistake ? (as you can see, the blue bar is stuck in top, like in this topic : Little circle-line bar stuck at top of NSOutlineView when rearranging using drag and drop) import Cocoa class ViewController: NSViewController, NSOutlineViewDataSource, NSOutlineViewDelegate, NSPasteboardItemDataProvider { @IBOutlet weak var outlineView: NSOutlineView! let REORDER_PASTEBOARD_TYPE = "com.test

NSOutlineView row not editable by “Return” key anymore after reloading a different table view cell

萝らか妹 提交于 2021-02-05 08:11:42
问题 I'm running into the strangest issue with my NSOutlineView : Everything is set up in a storyboard, i.e. the outline view and two NSTableCellView s The two cell views are mostly the same, only one shows an icon, the other one doesn't I can begin editing an item (row) by pressing the Return key, i.e. the NSTextField that is part of my NSTableCellView enters into edit mode. This is the default behavior and works fine so far. However: After editing ends and the item was changed, I use the second

NSOutlineView row not editable by “Return” key anymore after reloading a different table view cell

◇◆丶佛笑我妖孽 提交于 2021-02-05 08:11:32
问题 I'm running into the strangest issue with my NSOutlineView : Everything is set up in a storyboard, i.e. the outline view and two NSTableCellView s The two cell views are mostly the same, only one shows an icon, the other one doesn't I can begin editing an item (row) by pressing the Return key, i.e. the NSTextField that is part of my NSTableCellView enters into edit mode. This is the default behavior and works fine so far. However: After editing ends and the item was changed, I use the second

Expanding all items of a NSOutlineView that loads data from a data source

Deadly 提交于 2021-02-04 12:40:08
问题 First of all I'm new to cocoa development so I suppose I'm probably trying to do this the wrong way, but here goes: I have a NSOutlineView which loads the data from a NSOutlineViewDataSource implementation. I want all the items to be expanded after they are loaded, but i can't seem to find an event fired when the data has finished loading, so I can send a [outlineView expandItem: nil expandChildren: YES] to it. I looked into the NSOutlineViewDelegate protocol but I was unable to find a

Can't change column width in response to outlineViewItemDidExpand [closed]

依然范特西╮ 提交于 2020-12-15 03:57:41
问题 Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 days ago . Improve this question I want to update the column width to the width of the widest entry whenever a node in my NSOutlineView is expanded. Thus, my delegate listens to outlineViewItemDidExpand and calls [column setWidth:maxColumnWidth]; in it. maxColumnWidth is the width of the widest entry. However,

Error: Illegal NSOutlineView data source

你。 提交于 2020-05-30 07:58:09
问题 I created a prototype that successfully implements a Source View based on this tutorial. I then attempted to port it to the real application. When I run it, I get the error 2016-12-17 18:30:43.693194 jazzcat[67629:1970219] *** Illegal NSOutlineView data source (). Must implement outlineView:numberOfChildrenOfItem:, outlineView:isItemExpandable:, outlineView:child:ofItem: and outlineView:objectValueForTableColumn:byItem: I've spent hours comparing the two applications and can't find a