CocoaDev

Edit AllPages

I have panel represent my defaults via binding! All works fine but for the browse button I have:

I have a textfield holding a path and want to offer a browse button. The button is not realizable without ‘glue code’, is it? What’s the best way to do it?


Don’t know if this is the best way, but here’s what I did. Just put the following code in a custom class, and add an instance of the class to IB. Then bind your text field’s content value to a key (I used “template”) in user defaults. -JediKnil

/** Make this your Browse button’s action */

/** Called by NSOpenPanel */


Cool! Thought I could avoid glue code altogether now but that way is quite elegant :)