• 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
Updating property of core data entity does not update outline view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Updating property of core data entity does not update outline view


  • Subject: Updating property of core data entity does not update outline view
  • From: Richard <email@hidden>
  • Date: Wed, 28 Oct 2009 14:59:48 +0100

hey

thanks, that is exactly what i was looking for, i have got it working now
(nearly).

so, a related question. i have an outline view and when searches are
performed a new item is added to the outline view with a badge that displays
the number of search results. the outline view is bound to a tree controller
working in entity mode of type SidebarItem.

when search results arrive, i get the relevant SidebarItem from the
managedObjectContext and update the count property with the new amount. the
problem is that this does not update the outline view. if i cause the view
to be redrawn, the badge updates with the correct value. how can i get it to
do this automatically?

i tried sending a notification when the count was updated, and then
searching for the item in the outlineview when the notification is received,
but [outlineView rowForItem: ] always returns -1, so i cannot redraw the
updated row.

what am i doing wrong?



On Wed, Oct 28, 2009 at 9:23 AM, Matthew Lindfield Seager <
email@hidden> wrote:

> > could someone point me in the right direction, what is the easiest way of
> > doing this? would i have to override the text cell for the outline view,
> or
> > can i use a value transformer of some sort?
>
> I'm sure someone will correct me if (when?) I'm wrong but I've heard
> them called badges. Googling nsoutlineview badges returned a bunch of
> results & I'm sure you can find your way from there!
>
> Matt
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Adding new Core Data objects through a form
  • Next by Date: Re: Problem with allocating memory
  • Previous by thread: re: EXC_BAD_ACCESS when migrating a store, but only sometimes...
  • Next by thread: Programmatically invoking double-click bindings on NSTableView
  • Index(es):
    • Date
    • Thread