• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Indexed Accessors not being called...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Indexed Accessors not being called...


  • Subject: Indexed Accessors not being called...
  • From: Kam Dahin <email@hidden>
  • Date: Thu, 14 Sep 2006 12:56:04 -0700

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


  • Follow-Ups:
    • Re: Indexed Accessors not being called...
      • From: Wain <email@hidden>
  • Prev by Date: Re: Hide a window on close?
  • Next by Date: Re: NSOutlineView variable width cell
  • Previous by thread: Re: Intelligent NSFormatter
  • Next by thread: Re: Indexed Accessors not being called...
  • Index(es):
    • Date
    • Thread