NSButton, binding question

Discussion in 'Mac Programming' started by Monaj, Jul 28, 2010.

  1. Monaj macrumors regular

    May 24, 2009
    Hi all,

    I am trying a cocoa application with core-data. The application contains an entity: UsefulUrl with attribute: url. The entered urls are displayed in table view.

    I am able to insert, modify and delete the entered urls from table via cocoa bindings (NSArrayController).

    Now, I want to open the urls of selected rows in browser, on click of a button, using cocoa bindings.

    I think I can do it via button's bindings: Action Invocation - Argument/ Target, but I could not make it working.

    Can anyone suggest me exactly how to do it or some useful url?


  2. Monaj thread starter macrumors regular

    May 24, 2009
    solution found

    I was right... in the argument binding pane I binded the url of UsefulUrl and in target I binded the selector gotoUrl: in my controller class. In gotoUrl method I used NSWorkspace method to open the link in default browser and it is working as intended :)

Share This Page