Hey,
I have a tableview which content is managed through core data. When I select a row, a details view is pushed in and shows more information. How can I jump to the next record (the one below the one I selected in the tableview before) through a "next" button in the view ? Same for a previous button, but that should be very similar ......
First I thought I've grocked that thing: It's the data source for a UITableView. But then: It does not conform to that data source protocol. Strange! Why? How can it not?
...
Does NSFetchedResultsController make a call to the DB every time the table view asks for a new row?
Did anyone track that? Apple says it makes sure that at any given time there is an minimum of needed objects in mem, so actually that could be the only way to do it. What's offscreen gets lost, and what's scrolling in is fetched immediate...
One thing I have in mind is, that datasets in Core Data (or lets say: managed objects) have no ID like known from other databases such as MySQL. Also, they're not in a specific guaranteed order.
What else makes Core Data much more "special" compared to working with a relational database like MySQL? Besides the whole object graph persist...
Let me first say, I know how to create sections and group records within a UITableView.
What I am wanting to do is something similar to creating a photo album. So, I have all my data objects coming from core data, and, I want to be able to create a custom group, such as "My Trip to Mexico" and "First Birthday". Then, the user should b...
Hello,
I tried CoreData for iPhone app, but it's memory-hogging when entity instances are fetched. After they are released, memory usage doesn't decrease at all. Is there any way to treat them in a low memory usage.
Thank you.
...
I have an NSArrayController which is bound to a class in my Managed Object Context. During runtime the NSArrayController can have a number of different filter predicates applied. At certain intervals, I want to iterate through my NSArrayController's contents regardless of the filter predicate applied to it.
To do this, I set the filter...
I'm wanting to save a Many-to-one relationship parsed from JSON into Core Data.
The code that parses the JSON and does the insert into Core Data looks like this:
for (NSDictionary *thisRecipe in recipes) {
Recipe *recipe = [NSEntityDescription insertNewObjectForEntityForName:@"Recipe" inManagedObjectContext:insertionContext];
reci...
hi experts,
I have a simple todo list embedded in my main app,
I had established it in a separate project, then I add it to my main project carefully, everything is good but, when I write the todo and click save button the program is crash! what is the problem?
my code:
self.navigationItem.rightBarButtonItem =
[[[UIBarButtonItem alloc...
Hi there,
While programming an iPad-app, I'm just running into trouble using a fetchedResultsController with a "dynamic" predicate. it seems the changes to the predicate get ignored. No matter how the predicate changes, I always get the result of the first fetch ...
same code runs without no problems on iphone-env (3.1.x) !!
sample :
...
Hi
I have a question regarding a rather advanced DataModel which I would like to use with CoreData.
Before I get into details about what I did so far, I will describe what I want to do.
I have a List of Hotel Guests that stay in one Room and have Preferences. Once ready the user should select a guest and see the data and should also b...
I am implementing an undo/redo mechanism in my app. This works fine for lots of cases. However, I can't undo past deleteObject:. the object is correctly saved in the undo queue, and I get it back and reinsterted into the Core Data stack just fine when calling undo. The problem is that all it's attributes are getting set to nil when I...
I have completed and reproduced Core Data tutorials using a tableview to display contents. However, I want to access an Entity through a fetch on a view without a tableview. I used the following fetch code, but the count returned is always 0. The data exists when the database is opened using SQLite tools.
NSManagedObject *entryObj;...
Hello all. I have a Core Data store in which many of the entities should be unique instances of their particular NSEntityDescription. I'm currently doing this by creating a new entity for a given description, then this:
-(void)clearMyManagedObjectsExceptFor:(NSManagedObject*)except {
NSArray *managedObjects = [ self fetchMyManagedO...
Hi all. I have a Core Data store which contains a number of MediaItem entities that describe, well, media items. I also have NewsItems, which have one-to-many relationships to a number of MediaItems. So far so good.
However, I also have PlayerItems and GalleryItems which also have one-to-many relationships to MediaItems. So MediaItems a...
I need to write a custom setter method for a field (we'll call it foo) in my subclass of NSManagedObject. foo is defined in the data model and Xcode has autogenerated @property and @dynamic fields in the .h and .m files respectively.
If I write my setter like this:
- (void)setFoo: (NSObject *)inFoo {
[super setFoo: inFoo];
[sel...
I mean... is that a good idea?
...
If an abstract entity has it's own custom class, is that class usually abstract, too?
...
Hi
I am currently working on a project that uses CoreData and relations are using NSSet. I have currently 2 problems :
How to iterate over an NSSet using an index ? --> SOLVED
How to remove a specific object ? => I guess I need to iterate and check for the object ?
hmm looks like I also have a problem adding an object ? Whats wrong ...
The Xcode Data Modeler has this user info panel at the top right, second tab from left. It asks for key and value. What would I store in there? What is this useful for?
...