Change NSButton text

  • I have a button in my NIB file that is connected to the add method of an
    NSArrayController.

    I'd like to be able to change the text of that button at runtime, but I can
    figure out how to access it since I can't set it to an outlet in my app
    controller because that would break the button's NSArrayController bindings.

    How can I get a pointer to that NSButton?

    Thanks,
    CxT
  • On Sep 1, 2007, at 10:15 PM, Simon Raisin wrote:

    > I'd like to be able to change the text of that button at runtime,
    > but I can
    > figure out how to access it since I can't set it to an outlet in my
    > app
    > controller because that would break the button's NSArrayController
    > bindings.
    >

      How about connecting the button's action to an -addObject: method
    in your controller, changing the button's text, then calling the array
    controller's -add: method?

    --
    I.S.
previous month september 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today