Re: Indexed Accessors not being called...
Re: Indexed Accessors not being called...
- Subject: Re: Indexed Accessors not being called...
- From: Kam Dahin <email@hidden>
- Date: Thu, 14 Sep 2006 13:22:47 -0700
Thanks Wain,
I will give it a shot.
k
On Sep 14, 2006, at 1:21 PM, Wain wrote:
Yep, that's the problem - you need to use correct capitalisation or
the accessors wont be found, hence 'K'...
mmalcs accessor was countOfMenuItems, indicating that his variable
was called menuItems.
Hope that is clear now :)
Wain
On 14 Sep 2006, at 21:14, Kam Dahin wrote:
> Hi Wain,
>
> My <Key> name is:
>
> mMenuItemsArray
>
> so my indexed accessors are "countOfmMenuItemsArray"
> and
> "objectInmMenuItemsArrayAtIndex"
>
> thx,
>
> k
>
>
>
> On Sep 14, 2006, at 1:10 PM, Wain wrote:
>
>> Hi,
>>
>> Is it a simple matter of the wrong case, i.e -countOf<Key> and -
>> objectIn<Key>AtIndex: (note the capital K) or is that just e-mail
>> notation below?
>>
>> Wain
>>
>> On 14 Sep 2006, at 20:56, Kam Dahin wrote:
>>
>> > Hello,
>> >
>> > I am trying to create a dynamic menu in my Tableview's
>> > NSPopUpButtonCell that uses a mix of static items and dynamic
>> > items. I am using bindings and following (as close as I can
figure
>> > out how) mmalc's example here:
>> >
>> > http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
>> >
>> > on how to setup indexed accessors to mix Dynamic and static items
>> > into a menu.
>> >
>> > The problem I am having is that my indexed accessor methods
are not
>> > being called -- namely "countOf<key>" and "objectIn<key>AtIndex"
>> >
>> > I have two NSMutableArrays that I am using for my content. One
>> > array holds the dynamic content - the other holds the Static
>> > content. I have bound the NSArrayController that I am using
for my
>> > NSPopUpButtonCell to the array holding the static content, and
then
>> > (as shown in mmalc's example) I have implemented the indexed
>> > accessor methods on that static array in my main controller
class.
>> >
>> > In my init method of my main controller, I allocate the static
>> > array and then populate it with the initial menu items I want
>> > displayed. I also add the contents of my dynamic array that
exist
>> > at this point in my applications life cycle. When I run my
>> > project, I see the items in the Popup that I have added, but it
>> > appears that my indexed accessors are not being called.
>> >
>> > I have read this post:
>> >
>> > http://www.cocoabuilder.com/archive/message/cocoa/2005/4/3/132088
>> >
>> > and have implemented the mutableArrayValueForKey on my static
>> > array, but things still are not working.
>> >
>> >
>> > Can anyone help me here?
>> >
>> > regards
>> >
>> > k
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden