How to show button cell (check box) title in table view, using bindings

Discussion in 'Mac Programming' started by Monaj, Nov 10, 2011.

  1. Monaj macrumors regular

    Joined:
    May 24, 2009
    #1
    Hi All,

    I am trying a simple application where I have a mutable array of mutable dictionaries, such as -

    Code:
    NSMutableDictionary *sample6 = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"title6",@"title",[NSNumber numberWithBool:NO],@"state", nil];
    In IB I created a table view with NSButtonCell (check box).

    I was able to show checkboxes state (checked or unchecked), using following table column bindings:

    Code:
    Value - ArrayController.arrangedObjects.state
    In this case it shows an array of checkboxes with title - "Check".

    Can anyone suggest me some way to achieve this?

    Thanks
     
  2. Partron22 macrumors 68000

    Partron22

    Joined:
    Apr 13, 2011
    Location:
    Yes
    #2
    Doesn't this work for you?
    Bindings Inspector-> button cell's title parameter.ArrayController.arrangedObjects.titlesdata, where titlesdata is something you put into arrangedObjects.
     
  3. Monaj, Nov 11, 2011
    Last edited: Nov 11, 2011

    Monaj thread starter macrumors regular

    Joined:
    May 24, 2009
    #3
    Can you clarify which binding you are talking about ?

    I tried this binding but it didn't work -

    NSButtonCell-

    title : ArrayController.arrangedObjects.checkboxTitle

    I also checked NSTableColumn, bindings but there I could not find any binding for button cell title.
     
  4. Partron22 macrumors 68000

    Partron22

    Joined:
    Apr 13, 2011
    Location:
    Yes
    #4
    No.
    I went and tried that binding, and it didn't work.
    Everything came back with the same title, an element from the arranged objects title data, but always the same.
    Looks to me like the titles of controls in a table column are not individually settable. I knew that was true for control images in a table column, but apparently it holds for titles as well.
    -Sorry.
     

Share This Page