cocoa - NSTableCellView shows nothing if it's a group cell -


i'm trying make simple view-based nstableview groups , regular cells. every cell drawn correct , shows need unless add method nstableviewdelegate/datasource:

func tableview(tableview: nstableview, isgrouprow row: int) -> bool {     return (tablecontent[row] nsdictionary)["group"] != nil } 

it works fine, cells become group cells show nothing. i've tried on different cell types, still nothing, semi-transparent gray background. if add like

override func drawrect(dirtyrect: nsrect) {     nscolor(calibratedred: 0, green: 255, blue: 0, alpha: 1).setfill()     nsrectfill(dirtyrect)     super.drawrect(dirtyrect)      // drawing code here. } 

to group cell class i'll semi-transparent gray background.

i think maybe make same mistake did today.

when using func tableview(tableview: nstableview, isgrouprow row: int) -> bool, func tableview(_ tableview: nstableview, viewfor tablecolumn: nstablecolumn?, row: int) -> nsview? no longer provides tablecolumn grouped rows, means tablecolumn nil. if implementation relies on tablecolumn.identifier, unreliable.

you should change implementation relying on row grouped rows.


Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

java - Could not locate OpenAL library -

c++ - Delete matches in OpenCV (Keypoints and descriptors) -