How to get index in a NSOutlineView delegate method

Discussion in 'Mac Programming' started by naveen.rv, Jul 6, 2009.

  1. macrumors newbie

    Joined:
    Jul 6, 2009
    #1
    Hello,

    i am using NSOutlineView with custom NSCell, in the delegate function below, how do we get the index number, because i need to set different values of the cell for different row(like image and text), but here each time the item will be Nil, so how can i get the index number and how do i know which row i am returning the cell.


    -(NSCell *)outlineView:(NSOutlineView *)outlineview
    dataCellForTableColumn:(NSTableColumn *)tableColumn
    item:(id)item



    and also my tableView is always nil. what can be the problem.
     
  2. thread starter macrumors newbie

    Joined:
    Jul 6, 2009
    #2
    How to use custom cell in NSOutlineView

    Hello,

    i need to use custom cell in my Outline View,

    -> how can i link a node and my custom cell ?

    -> in datasource methods of normal outline view we check the index and column to return the respective value but when using cell's how will i get the index, how can i decode using item value ?

    if u have any sample's please share !


    Regards

    Naveen RV
     

Share This Page