• 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
Re: NSTableView crashing on scroll+update
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView crashing on scroll+update


  • Subject: Re: NSTableView crashing on scroll+update
  • From: "Shawn Erickson" <email@hidden>
  • Date: Tue, 31 Jul 2007 09:02:47 -0700

On 7/31/07, Marcelo Alves <email@hidden> wrote:
> Hi,
>
>    I'm working with NSTableView and Cocoa Bindings. Things are
> working fine, but, NSTableView crashes (log below) when I update my
> NSMutableSet while scrolling the NSTableView (with ~300 items). If
> I'm not scrolling, work as expected. My first (and only one) guess
> was locking the set, like :
>
>         -(void) replaceRoomsWith:(NSArray *)newRooms {
>                 NSSet *new_set = [NSSet setWithArray:newRooms];
>                 [self willChangeValueForKey:@"rooms"
> withSetMutation:NSKeyValueUnionSetMutation usingObjects:new_set];
>
>                 @synchronized(rooms){
>                         [rooms unionSet:new_set];
>                 }
>
>                 [self didChangeValueForKey:@"rooms"
> withSetMutation:NSKeyValueUnionSetMutation usingObjects:new_set];
>         }
>
>    But it didn't work. What should I do to avoid this annoying problem?
>
>    Some extra information :
>
>    - The application is multithreaded (ok, only extra thread), based
> on Communicating With Distributed Objects [1], but I'm doing all the
> changes in the set in the main thread;

Are you sure you are only updating on the main thread?

Why the use of @synchronized in the above if updates only take place
on the main thread?

-Shawn
_______________________________________________

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

  • Follow-Ups:
    • Re: NSTableView crashing on scroll+update
      • From: Marcelo Alves <email@hidden>
References: 
 >NSTableView crashing on scroll+update (From: Marcelo Alves <email@hidden>)

  • Prev by Date: Flipped view confusion
  • Next by Date: Re: Moveable/Resizable "Box" views and blurry frame
  • Previous by thread: NSTableView crashing on scroll+update
  • Next by thread: Re: NSTableView crashing on scroll+update
  • Index(es):
    • Date
    • Thread