Re: NSObjectController
Re: NSObjectController
- Subject: Re: NSObjectController
- From: Ricardo Strausz <email@hidden>
- Date: Mon, 24 Nov 2003 13:14:04 -0600
Gracias!
Thas is an *add-on* of the on-line docs... it is definetly not like
that in the docs installed on my HD...
file:///Developer/Documentation/Cocoa/Conceptual/ControllerLayer/Tasks/
ccwithbindings.html#//apple_ref/doc/uid/20002067
but now we know; Thanks Mike!
Dino
On Nov 19, 2003, at 7:54 AM, Michael Parlee wrote:
> Ray,
>
> It was in the tutorial on this page
> (http://developer.apple.com/documentation/Cocoa/Conceptual/
> ControllerLayer/Tasks/ccwithbindings.html#//apple_ref/doc/uid/
> 20002067) just above the "Add a Controller" heading.
>
> I don't know if you guys are fans of Aaron Hillegass' book on Cocoa
> but you might be interested in what he thinks of the new ControllLayer
> here http://www.bignerdranch.com/Resources/nscontroller.html.
>
> Mike
>
> On Nov 19, 2003, at 12:49 AM, Ray Ackland wrote:
>
>> Michael,
>>
>> Seems that the mentioned initialize method was the trick. But how the
>> heck were we supposed to figure that out from the tutorial?? I'm sure
>> it wasn't mentioned anywhere in the docs. Did you have experience
>> with it previously?
>>
>> Well Dino, hope that gets it going for you too.
>>
>> Ray.
>>
>> (NB I used the line [this setKeys: )
>>
>>
>> On 19/11/2003, at 19:20, Michael Parlee wrote:
>>
>>> Hi Ray,
>>>
>>> I'll take this offline. As you say, it is a bit off topic for the
>>> WO dev list.
>>>
>>> Did you create the initialize method in your Converter class? Based
>>> on your description I would guess the problem lies here.
>>>
>>> + (void)initialize {
>>> [Converter setKeys:
>>> [NSArray arrayWithObjects:@"dollarsToConvert",
>>> @"exchangeRate", nil]
>>>
>>> triggerChangeNotificationsForDependentKey:@"amountInOtherCurrency"];
>>> }
>>>
>>> As I understand it, the setKeys method is a new addition to
>>> NSObject. You provide it with an array of keys and a key to call
>>> when either of the keys in the array are changed.
>>>
>>> You might check that there are no typos in any of the key strings.
>>> I know you get a runtime exception when keys are mismatched in WO
>>> but I don't know what happens in NSController.
>>>
>>> Hope that helps,
>>>
>>> Mike
>>>
>>> On Nov 18, 2003, at 11:25 AM, Ray Ackland wrote:
>>>
>>>> Michael,
>>>>
>>>> For me the app seemed to run "fine" - apart from the answer field
>>>> not receiving its value. If I changed the method that calculates
>>>> the value (say, to return a fixed result), that result is entered
>>>> into the field when the app launches (checking that my bindings are
>>>> correct) but not after that (ie if I change that field, it doesn't
>>>> get set back).
>>>>
>>>> Similarly, when in debugging mode the method only gets called once.
>>>> Implies that the other methods aren't firing the results method.
>>>> Hard to remember what I have checked as it was a while back that I
>>>> played with this.
>>>>
>>>> NB perhaps this conversation should be moved off WO dev to a Cocoa
>>>> discussion list?
>>>>
>>>> Ray.
>>>>
>>>> On Wednesday, Nov 19, 2003, at 06:09 Pacific/Auckland,
>>>> email@hidden wrote:
>>>>
>>>>> Yeah, I have tried the NSObjectController tutorial and it worked
>>>>> fine
>>>>> for me. It works differently than the old CurrencyConverter in
>>>>> that
>>>>> the convert action happens immediately on entering values. What
>>>>> kind
>>>>> of bug are you seeing? Also is this part one of the tutorial or
>>>>> part
>>>>> two (the tabular version)?
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.