• 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
Trouble with NSCollectionView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trouble with NSCollectionView


  • Subject: Trouble with NSCollectionView
  • From: "Carter R. Harrison" <email@hidden>
  • Date: Thu, 17 Jan 2008 08:39:56 -0500

Greetings Everybody,

I'm writing an application that reads in a text file containing a number of individual messages. The messages are delimited by the pipe "|" character, and I'm trying to index the data inbetween the delimiters so that it can be searchable and reportable. I'm using Core Data for this. My managed object model is something like this:

Entity: File
- has a 1 to many relationship with the Message entity.

Entity: Message
- has a 1 to many relationship with the Field entity.

Entity: Field
- has a "value" property of type String.

I've written a method that reads in the text from a file, parses out the individual messages, and then within each message, parses out each field - all the while inserting this information into the managed object context. My method is pretty fast. I can index a file containing 162 messages in about 2.5 seconds. This performance is acceptable for my needs.

Now I'm trying to integrate an NSCollectionView into my application. Each view in the NSCollectionView contains a NSTextView containing the text of each message in a selected file. The NSCollectionView's "Content" binding is bound to an Array Controller that holds every open file. So when the user selects a new open file, the NSCollectionView updates accordingly by displaying that file's messages. This all works fine, but the problem is that with the NSCollectionView bound to the Array Controller, the performance is horrible! My CPU usage is at 100% and my application's memory usage runs off the chart! I can't seem to figure out what the problem is here. I know the problem isn't within my function that performs the indexing b/c this works just fine when the NSCollectionView is not hooked up.

Anybody have any clue what I'm doing wrong here? The NSCollectionView is a new class and unfortunately there isn't a lot of documentation on it just yet. Thanks in advance!
_______________________________________________


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: Trouble with NSCollectionView
      • From: "Kyle Sluder" <email@hidden>
  • Prev by Date: Re: applicationShouldTerminate delegate does not work in Leopard
  • Next by Date: Re: applicationShouldTerminate delegate does not work in Leopard
  • Previous by thread: Re: Outline view selection doesn't change when new items are inserted?
  • Next by thread: Re: Trouble with NSCollectionView
  • Index(es):
    • Date
    • Thread