Re: Cocoa Bindings Question(s)
Re: Cocoa Bindings Question(s)
- Subject: Re: Cocoa Bindings Question(s)
- From: <email@hidden>
- Date: Tue, 20 Jul 2004 9:18:10 -0400
>
Well, mystery solved. The "working" version had a different name for the mutable array, so I changed it, and the accessor functions to match and it was still working. I realized the thing that broke one version was the CASE of the accessor function!
>
The array was named: booksList
>
working version: -(void)setbooksList:(NSMutableArray *)newBooksList;
>
non-working: -(void)setBooksList:(NSMutableArray *)newBooksList;
>
See the difference? I didn't notice it..
>
Also, the "working" version (and also the fixed, "non-working" version) do not create the booksList array in the init method ([[NSMutableArray alloc] init]).
>
Though.. looking at mmalc's "Todo's" sample, his array is named "toDos" and the accessor is "setToDos" and that works... Ok. Got me.... (his version does initialize the array).
>
So some combination of creating the array makes the case of the accessor not matter?
Quick followup...
I added an NSLog call to the setBooksList method.
When it's named setBooksList, and the array is created in -init, it is called. (when the array is not created, the error is shown).
When it's named setbooksList, whether or not the array is created in -init, the method is NOT called. The booksList variable must be being access directly? Something strange is going on... does capitalization matter or not?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.