Re: NSMutableData and Pinned Memory buffers..

2012-12-13 Thread Melissa J Turner
On Dec 13, 2012, at 4:28 PM, Kevin Perry wrote: > > On Dec 13, 2012, at 4:24 PM, Greg Parker wrote: > >> On Dec 13, 2012, at 4:13 PM, Robert Monaghan wrote: >>> I went ahead and created a really crude subclass of NSMutableData. It seems >>> to work for my situation. >>> Attached is the code

Re: What does core data do during a Save As?

2010-10-04 Thread Melissa J. Turner
On Oct 1, 2010, at 10:02 PM, Jerry Krinock wrote: > > On 2010 Oct 01, at 10:44, Quincey Morris wrote: > >> Core Data implements Save As as a migration process using a mapping model >> that it constructs on the fly > > Eeek. I never knew that. > I'm late to the game, but this is incorrect.

Re: Finding Core Data objects in Instruments

2010-08-31 Thread Melissa J. Turner
On Aug 30, 2010, at 7:35 PM, Rick Mann wrote: > We're having a hard time tracking down our smaller leaks in our iPad app. > When running on the simulator, one thing we noticed is that none of our Core > Data objects shows up in Leaks or Allocations (all of them have custom > NSManagedObject su

Re: Managed Object with Transformable Attribute (C Struct)

2009-12-16 Thread Melissa J. Turner
On Dec 15, 2009, at 20:47, Richard Somers wrote: > On Dec 15, 2009, at 9:18 PM, Graham Cox wrote: > >> You're archiving 'value'. You want instead to return the mutableData that >> the first archiver wrote to, which is otherwise unused. > > Thanks. Saving keyed archive of struct foo now works f

Re: Core Data: insertNewObjectForEntityForName doesn't return my custom subclass during migration

2009-12-03 Thread Melissa J. Turner
On Dec 3, 2009, at 09:08, Sean McBride wrote: > Hi all, > > The docs for NSEntityDescription say > "initWithEntity:insertIntoManagedObjectContext: returns an instance of > the appropriate class for the entity". > > This seems to be mostly true. Yet when I do: > > [NSEntityDescription insertNe

Re: Help debugging "Dangling reference to an invalid object." Core Data error

2009-10-22 Thread Melissa J. Turner
On Oct 22, 2009, at 16:26, Sean McBride wrote: > Hi all, > > Core Data is giving me a validation error when I try to save a document > after making a simple change. > > I have an entity 'Scene' with a to-many relationship to an entity > 'Target'. The inverse relationship is also to-many. Both

Re: Core Data fetch with to-many relationship

2009-09-08 Thread Melissa J. Turner
On Sep 8, 2009, at 18:03, Alex Reynolds wrote: Relationship fault for (), name Book, isOptional 1, isTransient 0, entity Owner, renamingIdentifier Book, validation predicates ( ), warnings ( ), versionHashModifier (null), destination entity Book, inverseRelationship Owner, minCount 0, max

Re: Finder-style sorting and the SQL Core Data store, best practice?

2009-09-01 Thread Melissa J. Turner
As of SnowLeopard, Core Data supports the following selectors for sorting in the SQLite store: compare: (since Tiger(I think)) caseInsensitiveCompare: (since Leopard) localizedCompare: (new in SL) localizedCaseInsensitiveCompare: (new in SL) localizedStandardCompare: (new in SL) The last compa

Re: CoreData / SQL hang on save

2009-08-25 Thread Melissa J. Turner
Thanks, Greg On Aug 25, 2009, at 1:16 PM, Melissa J. Turner wrote: On Aug 25, 2009, at 02:19, Greg Hoover wrote: I've run into a hang in CoreData save. I'm the single coordinator, multiple object contexts threading model and a SQL store (though it seems to happen with XML

Re: CoreData / SQL hang on save

2009-08-25 Thread Melissa J. Turner
On Aug 25, 2009, at 02:19, Greg Hoover wrote: I've run into a hang in CoreData save. I'm the single coordinator, multiple object contexts threading model and a SQL store (though it seems to happen with XML as well). The hang occurs inside the NSSQLCore and seems to just loop endlessly.

Re: Core Data dog-slow when using first time after boot

2009-08-20 Thread Melissa J. Turner
On Aug 20, 2009, at 02:35, Ruotger Skupin wrote: Complex locale aware Unicode text queries can be slow. If you find yourself spending time with such a query, you should consider some of the techniques shown in the DerivedProperty example available on ADC. Isn't all text Unicode? No.

Re: Clarification of NSPredicate constraints for Core Data SQL store

2009-06-30 Thread Melissa J. Turner
On Jun 30, 2009, at 09:44, Barry Wark wrote: In the "Constraints and Limitations" section of the Predicate Programming Guide (http://developer.apple.com/documentation/Cocoa/Conceptual/Predicates/Articles/pBasics.html#//apple_ref/doc/uid/TP40001792-249799 ), the second bullet states than only

Re: Core Data Migration and the Inexperienced Younger Self

2009-05-06 Thread Melissa J. Turner
Context is important. Also future-proofing. If your app was originally written against v1 CoreData (Tiger), you need to update the app to be wise enough to check the store's metadata and run away, run away from any store containing unexpected values (ie version hash information). v1 CoreDa

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-28 Thread Melissa J. Turner
(apologies for the delay; I've been on vacation for the last few days and just got back) On Apr 28, 2009, at 14:32, Kyle Sluder wrote: So step 1 is to stop clinging to normalization rules. (My database professor would kill me for that sentence, but it's true.) There really is no redundancy

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-23 Thread Melissa J. Turner
On Apr 23, 2009, at 05:18, Mike Abdullah wrote: On 22 Apr 2009, at 22:34, Melissa J. Turner wrote: On Apr 22, 2009, at 02:12, Mike Abdullah wrote: On 22 Apr 2009, at 08:48, Ben Trumbull wrote: Of course, why Apple couldn't have then added automatic support for in-memory matchi

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-22 Thread Melissa J. Turner
On Apr 22, 2009, at 02:12, Mike Abdullah wrote: On 22 Apr 2009, at 08:48, Ben Trumbull wrote: Of course, why Apple couldn't have then added automatic support for in-memory matching as the second step I don't know Probably because nobody ever cared enough to file an enhancement request, a

Re: Implementing a many-to-many ("reflexive") relationship using bindings and an NSTableView

2009-03-25 Thread Melissa J. Turner
On Mar 25, 2009, at 13:44, Jon C. Munson II wrote: [Jon C. Munson II] OK. Benjamin Stiglitz responded suggesting I take a look at the ToManyCheckbox example on mmalc's page, so I'll do that and see if that clarifies things. Also, I noticed in the iClass example that code is used to sup

Re: CoreData mystery: configuration used to open the store is incompatible...

2008-12-15 Thread Melissa J. Turner
There was a change between Tiger and Leopard in the way NSPersistentDocument loaded its model. If you have a document created on Tiger, the model is created using [NSManagedObjectModel mergedModelFromBundles: [NSBundle allBundles]], and on Leopard, with [NSManagedObjectModel mergedModelFrom

Re: CoreData -- addPersistentStoreWithType crashing

2008-12-10 Thread Melissa J. Turner
Hi Ben - What's the backtrace you get when you crash your application in the debugger? +Melissa On Dec 10, 2008, at 02:58, Ben Lachman wrote: Hi all: I've been making some changes to one of my apps which include a change to the data model. Now whenever I start up the app it crashes (

Re: Core Data request predicates and to-many relationships

2008-12-08 Thread Melissa J. Turner
On Dec 8, 2008, at 14:47, Luke Evans wrote: Thanks for the reply Melissa - much appreciated. I was beginning to toy with the idea of trying a function expression (which I have used before for other purposes) to isolate an individual attribute object and perform the several comparisons th

Re: Core Data request predicates and to-many relationships

2008-12-08 Thread Melissa J. Turner
On Dec 6, 2008, at 01:45, Luke Evans wrote: If there are any NSPredicate gurus out there, I'm scratching my head on this one: I have an entity that can optionally have a set of attributes (name- value pairs). This is set up in the model as a optional to-many relationship to an attribute

Re: Multiple persistent store coordinators gotchas?

2008-10-15 Thread Melissa J. Turner
On Oct 15, 2008, at 17:41, Dave Dribin wrote: On Oct 15, 2008, at 5:52 PM, Melissa J. Turner wrote: The downside tends to be more memory use, since you'll have two copies of all the data for each object that is loaded into both stacks in addition to the overhead of the stack itself.

Re: Multiple persistent store coordinators gotchas?

2008-10-15 Thread Melissa J. Turner
On Oct 15, 2008, at 14:00, Dave Dribin wrote: Hello, I'm working on a Core Data application that does lots of processing of the data in background threads to generate reports. I'd like to investigate using multiple persistent store coordinators to reduce lock contention, i.e. pattern #2

Re: Comparing the Class

2008-10-15 Thread Melissa J. Turner
On Oct 15, 2008, at 06:20, Ruotger Skupin wrote: Hi, when comparing the class of two objects I usually do [obj1 isKindOfClass:[obj2 class]]. But if I say have the Class as an input value to a method: - (void) bla:(Class) inClass { if (/* inClass is an NSString */) {

Re: Sub-classing NSAtomicStore

2008-07-08 Thread Melissa J. Turner
Todd - I'd suspect one of two things: 1) Your store's metadata method isn't returning the same identifier (ie @"AtomicStore") you're passing to addPersistentStore, so the coordinator thinks the store isn't what the caller of addPersistentStore said it would be 2) Your store's metadata meth

Re: Core Data "entity required" error

2008-06-02 Thread Melissa J. Turner
*Checks the oracle bones ... * Does the store configuration for your SQL store contain all the entities in your model? If not, you need to make sure that all the entities for objects you're trying to save into the store are in it. +Melissa On Jun 2, 2008, at 10:07, Hamish Allan wrote: On

Re: Immediate memory release

2008-04-30 Thread Melissa J. Turner
On Apr 30, 2008, at 19:59, Chris Suter wrote: On 01/05/2008, at 12:27 PM, Jens Alfke wrote: On 30 Apr '08, at 5:53 PM, Graham Cox wrote: If throws an exception won't that mean that is leaked? (and all of its contents up to that point too; applies to both of our code examples). Yup.

Re: Adding CalendarStore.framework changes managed object model version?

2008-03-25 Thread Melissa J. Turner
Brad - At a guess, you're somehow pulling in CalendarStore.calmom into your model. This might happen if you're doing [NSManagedObjectModel mergedModelFromBundles: [NSBundle allBundles]], which is declared dangerous for just this reason. +Melissa On Mar 25, 2008, at 17:56, Brad Willoughby

Re: NSBundle wierdness in OCUnit target:

2008-03-10 Thread Melissa J. Turner
Ok, so it's the expected behavior. Phooey! I then have two questions: 1) How do I "inject [my] tests into [my] application?" You shouldn't need to. They're being injected automatically as part of the way the Xcode OCUnit test targets work. Try printing out [NSBundle allBundles]. Your