Re: Initial value of on/off buttons

2008-04-28 Thread Hamish Allan
On Fri, Apr 25, 2008 at 5:13 PM, Yann Disser <[EMAIL PROTECTED]> wrote: > I realize that my buttons are generally not affected by the changes I make > to the bool-values. Only the other way around. On Sun, Apr 27, 2008 at 10:59 AM, Yann Disser <[EMAIL PROTECTED]> wrote: > The problem was, that

Re: Initial value of on/off buttons

2008-04-27 Thread Scott Anguish
and, to add another addendum.. in the case of some controls (text fields and text views for example) not using a controller _can_ cause you problems, and your app to lose data. anything that doesn't immediately send its value to from a control to the data model upon editing requires some

Re: Initial value of on/off buttons

2008-04-27 Thread William Turner
Just a little addendum here... You aren't strictly _required_ to use an NSObjectController (or other NSController subclass), but in practice it is generally better to do so. Yes, you can bind your views directly to your controller classed, but that's not really the ideal pattern - see http:

Re: Initial value of on/off buttons

2008-04-27 Thread Yann Disser
Ok, I finally solved my problem... I do NOT need an NSObjectController! Perhaps you got me wrong about what I tried to accomplish. The problem was, that I was binding the value of my buttons to bools that did not directly belong to my controller class but to an attribute of my controller

Re: Initial value of on/off buttons

2008-04-25 Thread I. Savant
On Apr 25, 2008, at 7:37 PM, Yann Disser wrote: Are you binding via an NSObjectController? No, should I? Yes (or one of its subclasses). You have to make sure "everyone is on the same page" as mindless corporate and government automatons are wont to say. In Cocoa, this is done easiest

Re: Initial value of on/off buttons

2008-04-25 Thread Yann Disser
No, should I? Yann On 25. Apr 2008, at 18:32, Hamish Allan wrote: On Fri, Apr 25, 2008 at 5:13 PM, Yann Disser <[EMAIL PROTECTED]> wrote: I realize that my buttons are generally not affected by the changes I make to the bool-values. Only the other way around. Can I not bind bools to the v

Re: Initial value of on/off buttons

2008-04-25 Thread Hamish Allan
On Fri, Apr 25, 2008 at 5:13 PM, Yann Disser <[EMAIL PROTECTED]> wrote: > I realize that my buttons are generally not affected by the changes I make > to the bool-values. Only the other way around. > > Can I not bind bools to the value of NSButtons? Or am I missing something > else? Are you bind

Re: Initial value of on/off buttons

2008-04-25 Thread Yann Disser
I realize that my buttons are generally not affected by the changes I make to the bool-values. Only the other way around. Can I not bind bools to the value of NSButtons? Or am I missing something else? Thanks for your help, Yann Yann Disser wrote: I have five textured NSButtons that are s

Initial value of on/off buttons

2008-04-25 Thread Yann Disser
I have five textured NSButtons that are set to operate in "On Off" mode. All of them are value-bound to different bools in my application. Somehow the first button starts in the "On"-state and the others in the off state, no matter which button I bind to which bool. If I remove the bindings,