tags:

views:

75

answers:

1

Hi,

I want to save the filePath of an ImageAttachement in Core Data.

The method addNewImageAttachementWithFilePath creates a new ImageAttachement and registers this at Core Data.

Now I have the problem that the filepath is cut when the filepath of the imageAttachement is set.

- (void) addNewImageAttachmentWithFilePath:(NSString *)filepath
{
ImageAttachment *imageAttachment = [NSEntityDescription insertNewObjectForEntityForName:@"ImageAttachment"
                  inManagedObjectContext:[self managedObjectContext]];  
imageAttachment.filePath = [NSString stringWithString:filepath];   
[self addAttachmentsObject:imageAttachment];  
}

the filepath is correct. When I set the imageAttachement.filePath to the filepath, the rest of the string is cut.

Thanks for your help.

A: 

after some rebuilds and praying the assertation is correct for now. Still a bit confused.

bhirmer