Search Results

Search found 9486 results on 380 pages for 'core plot'.

Page 11/380 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • core-data relationships and data structure.

    - by Boaz
    What is the right way to build iPhone core data for this SMS like app (with location)? - I want to represent an entity of conversation with "profile1" "profile2" that heritage from a profile entity, and a message entity with: "to" "from" "body" where the "to" and "from" are equal to "profile1" and/or "profile2" in the conversation entity. How can I make such a relationships? is there a better way to represent the data (other structure)? Thanks

    Read the article

  • iPhone: Core Data save Class object

    - by Nic Hubbard
    I have an entity in core data called Location. Inside this I have a few fields, such as date. But, I would also like to save a class object in it that I created called Annotation. What type of attribute would I use for this, since it is a custom class object that I created? Location (object) |__ Date |__ Annotation (MKAnnotation protocol)

    Read the article

  • Cocoa Core data filename?

    - by RW
    I followed Apple's example for creating a managed object which btw was great... http://developer.apple.com/cocoa/coredatatutorial/index.html However I now want to know what "name" (filename) the user saved his data as. Does anyone know how to pull the filename from the core data object. something like this would be great... NSLog (@"the filename is %@", [coreData filename]); Any ideas?

    Read the article

  • Core Data deleteObject: sets attributes to nil

    - by SG1
    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 delete it. I have an entity "Canvas" with a to-many relationship called "graphics" to a "Graphic" entity, which has its inverse set to "canvas". Deleting a Graphic, then inserting it back, doesn't work. Here's the code (the redo method is basically the same): - (void)deleteGraphic:(id)aGraphic { //NSLog(@"undo drawing"); //Prepare the undo/redo [self.undoManager beginUndoGrouping]; [self.undoManager setActionName:@"Delete Graphic"]; [[self.detailItem valueForKey:@"graphics"] removeObject:aGraphic]; [[self managedObjectContext] deleteObject:aGraphic]; //End undo/redo [self.undoManager registerUndoWithTarget:self selector:@selector(insertGraphic:) object:aGraphic]; [self.undoManager endUndoGrouping]; NSLog(@"graphics are %@", [self sortedGraphics]); //Update drawing [self.quartzView setNeedsDisplay]; } and here's the wierdness: Before delete: graphics are ( <NSManagedObject: 0x1cc3f0> (entity: Graphic; id: 0x1c05f0 <x-coredata:///Graphic/t840FE8AD-F2E7-4214-822F-7994FF93D4754> ; data: { canvas = 0x162b70 <x-coredata://A919979E-75AD-474D-9561-E0E8F3388718/Canvas/p20>; content = <62706c69 73743030 d4010203 04050609 0a582476 65727369 6f6e5424 746f7059 24617263 68697665 7258246f 626a6563 7473>; frameRect = nil; label = nil; order = 1; path = "(...not nil..)"; traits = "(...not nil..)"; type = Path; }) After redo: graphics are ( <NSManagedObject: 0x1cc3f0> (entity: Graphic; id: 0x1c05f0 <x-coredata:///Graphic/t840FE8AD-F2E7-4214-822F-7994FF93D4754> ; data: { canvas = nil; content = nil; frameRect = nil; label = nil; order = 0; path = nil; traits = nil; type = nil; }), You can see it's the same object, just totally bleached by Core Data. The relationship delete rouls apparently have nothing to do with it as I've set them to "No Action" in a test.

    Read the article

  • How to access core data objects from Javascript?

    - by Eli
    How can I gain access to Core Data objects from Javascript/WebKit on Mac OS X? I've made custom subclasses of NSManagedObject for each of my tables, with accessors defined using @property/@dynamic for each attribute, but neither isSelectorExcludedFromWebScript: or isKeyExcludedFromWebScript: is called for any of them, so Javascript just stops when I try to access any of the attributes. It returns 'undefined' if I access it as a property (eg business.name ) and javascript execution stops if I access it as a function (eg business.name() ).

    Read the article

  • iPhoneOS Core Data migration: moving something from an entity into a file

    - by Tim Sullivan
    I have a scenario where I'm moving the contents of a blob stored in a core data entity into a file. I need a way to export that data during a migration, where I know the entity that's being converted and save the blob to a file, writing the location of that file into the converted entity's appropriate attribute. I can't seem to find a way to do this. The docs regarding the Three Stage Migration seem to indicate what can be done, but I'm not sure where to define things, or what exactly to define.

    Read the article

  • Core Location and speed measurements

    - by Krumelur
    Does anyone know if Core Location in the iPhone OS uses anything but simple vector math to calculate speed? I've read that the GPS system can provide speed measurements that can be accurate when position is not (I believe using the Doppler shifts of the signals). I've tried and failed to see if the iPhone does this. The question is basically, does this data contain information or is it just convenience functions, using (filtered?) location data?

    Read the article

  • Core Data Change property value when another property changes

    - by user320587
    Hi, I have a Core Data Entity which has three properties startDate, endDate and duration. All three properties are persistent properties. I would like to know how I can calculate and update the duration property whenever the value for startDate and endDate changes? BTW, I won't be able to make the duration as transient property since I have to use the property for sorting in my table view? Any help is greatly appreciated Thanks, Javid

    Read the article

  • iOS Core Data migration: moving something from an entity into a file

    - by Tim Sullivan
    I have a scenario where I'm moving the contents of a blob stored in a core data entity into a file. I need a way to export that data during a migration, where I know the entity that's being converted and save the blob to a file, writing the location of that file into the converted entity's appropriate attribute. I can't seem to find a way to do this. The docs regarding the Three Stage Migration seem to indicate what can be done, but I'm not sure where to define things, or what exactly to define.

    Read the article

  • UIDatePicker Not storing time in core data

    - by Derek
    Hi, I am using a UIDatepicker with only "Time", I save the time in a NSDate object type, however when I try to store the Object in core data I get an error saying its not a NSDate type... *tt = [pickerTime date]; [myObject setValue:tt forKey:@"time"]; Thanks,

    Read the article

  • Core Animation Unwanted Text Sharpening.

    - by dave-gennel
    Whenever I add a layer for Core Animation either from the nib or programatically, the NSTextFields (labels) in my interface get messed up. Here's a screenshot from Apple's BasicCocoaAnimations example. (Look at the text fields on the left, somehow they're drawn sharper than normal) Note that if I add a layer in IB then it also gets messed up in IB itself before I even run my app.

    Read the article

  • Core data fetch only returns unique managed objects

    - by JK
    I execute a core data fetch which specifies a predicate as follows: NSPredicate *predicate = [NSPredicate predicateWithFormat:@"identifier IN %@", favoritesIDs]; When there are duplicate items in the favoriteIDs array, the fetch request only returns 1 managed object. How can I ensure that more than one instance is fetched? Thank you.

    Read the article

  • Store NSArray In Core Data Sample Code?

    - by Stunner
    Ey guys, I have been searching for some sample code on how to store an NSArray in Core Data for awhile now, but haven't had any luck. Would anyone mind pointing me to some tutorial or example, or better yet write a simple sample as an answer to this question? I have read this but it doesn't show an example of how to go about implementing a transformable attribute that is an NSArray. Thanks in advance!

    Read the article

  • Core Data: Mass updates possible?

    - by wgpubs
    Is it possible to do mass updates on a given entity in Core Data? Given an Person entity for example, can I do something like this: Person.update(@"set displayOrder = displayOrder + 1 where displayOrder > 5") Or is my only option to fetch all the entities needed and then loop through and update them individually??? Thanks

    Read the article

  • Core Data - Best way to save a "number of items"

    - by Daniel Granger
    The user will have a static list of items to choose from. Using a Picker View they will choose one of the items and then select how many of them they want. Whats the best way to save this in core data? A Struct? struct order { NSInteger item; NSInteger numberOf; }; Or some sort of relationship? Many Thanks

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >