Re: KVO Question -- Really Simple for Pros

2008-06-28 Thread Owen Yamauchi
On Fri, Jun 27, 2008 at 10:20 PM, Alex Wait [EMAIL PROTECTED] wrote: But I was sure since I have a firstName method and a setFirstName method it would update the textField. I have used IB to bind the value of the textField to the value of the person object and that works when I edit the

Re: KVO Question -- Really Simple for Pros

2008-06-28 Thread Owen Yamauchi
On Fri, Jun 27, 2008 at 11:29 PM, Alex Wait [EMAIL PROTECTED] wrote: I've read what you said but I don't know what to do still. Do I need to implement the method? the -observeValueForKeyPath :ofObject:change:context: method? No. NSTextField implements this already. See below. I am not

Re: KVO Question -- Really Simple for Pros

2008-06-28 Thread mmalc Crawford
On Jun 27, 2008, at 11:29 PM, Alex Wait wrote: What I need to know is what I need to add to get the text field to update whenever firstName is changed. I want it to set the value of its string value to the string. That's explained in the document for which I provided the link... mmalc

KVO Question -- Really Simple for Pros

2008-06-27 Thread Alex Wait
Practicing some KVO concepts. I have this line [person addObserver:textField forKeyPath:@firstName options:NSKeyValueObservingOptionNew context:NULL]; person is App Controller's Person object. textField is a NSTextField person does have a firstName property of type NSString When I click

Re: KVO Question -- Really Simple for Pros

2008-06-27 Thread mmalc crawford
On Jun 27, 2008, at 10:20 PM, Alex Wait wrote: But I was sure since I have a firstName method and a setFirstName method it would update the textField. I have used IB to bind the value of the textField to the value of the person object and that works when I edit the textfield (yay). So I

Re: KVO Question -- Really Simple for Pros

2008-06-27 Thread Alex Wait
could you be more specific that just a link? ;) On Fri, Jun 27, 2008 at 10:23 PM, mmalc crawford [EMAIL PROTECTED] wrote: On Jun 27, 2008, at 10:20 PM, Alex Wait wrote: But I was sure since I have a firstName method and a setFirstName method it would update the textField. I have used IB