cocoa - NSBrowser image is not displaying in cell -


i'm using nsbrowser view show list of files , folder in finder type app.i'm using new item base api nsbrowser.

the problem when try set image in willdisplaycell method. nothing displayed in view.

code:

// utility method find parent item given column. item based api eliminates need method. - (filesystemnode *)parentnodeforcolumn:(nsinteger)column {     if (_rootnode == nil) {         _rootnode = [[filesystemnode alloc] initwithurl:[nsurl fileurlwithpath:@"/users/kiritvaghela"]];     }      filesystemnode *result = _rootnode;     // walk column, finding selected row in column before , using in children array     (nsinteger = 0; < column; i++) {         nsinteger selectedrowincolumn = [_browser selectedrowincolumn:i];         filesystemnode *selectedchildnode = [result.children objectatindex:selectedrowincolumn];         result = selectedchildnode;     }      return result; }  - (void)browser:(nsbrowser *)browser willdisplaycell:(nsbrowsercell *)cell atrow:(nsinteger)row column:(nsinteger)column {     filesystemnode *parentnode = [self parentnodeforcolumn:column];     filesystemnode *childnode = [parentnode.children objectatindex:row];      [cell settitle:childnode.displayname];      cell.image = node.icon;  } 

apple simplecocoabrowser example


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -