Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 833913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:35:39+00:00 2026-05-15T04:35:39+00:00

I’m attempting to load data from an undocumented API (OsiriX). Getting the NSManagedObject like

  • 0

I’m attempting to load data from an undocumented API (OsiriX).

Getting the NSManagedObject like this:
NSManagedObject *itemStudy = [[BrowserController databaseOutline] itemAtRow: [[BrowserController databaseOutline] selectedRow]];

works just fine.

But getting the NSManagedObject like this:
seriesArray = [_context executeFetchRequest:request error:&error];
NSManagedObject *itemSeries = [seriesArray objectAtIndex:0];

Generates an error when I call [itemSeries valueForKey:@"type"]

2010-05-27 11:04:48.178 rcOsirix[27712:7b03] Exception: [<NSManagedObject 0xd30fd0> valueForUndefinedKey:]: the entity Series is not key value coding-compliant for the key "type".

This confuses me thoroughly. If I print the KVC values for itemSeries I get this list:

2010-05-27 11:04:48.167 rcOsirix[27712:7b03] KVC comment
2010-05-27 11:04:48.168 rcOsirix[27712:7b03] KVC date
2010-05-27 11:04:48.168 rcOsirix[27712:7b03] KVC dateAdded
2010-05-27 11:04:48.169 rcOsirix[27712:7b03] KVC dateOpened
2010-05-27 11:04:48.169 rcOsirix[27712:7b03] KVC displayStyle
2010-05-27 11:04:48.170 rcOsirix[27712:7b03] KVC id
2010-05-27 11:04:48.170 rcOsirix[27712:7b03] KVC modality
2010-05-27 11:04:48.170 rcOsirix[27712:7b03] KVC name
2010-05-27 11:04:48.171 rcOsirix[27712:7b03] KVC numberOfImages
2010-05-27 11:04:48.171 rcOsirix[27712:7b03] KVC numberOfKeyImages
2010-05-27 11:04:48.171 rcOsirix[27712:7b03] KVC rotationAngle
2010-05-27 11:04:48.172 rcOsirix[27712:7b03] KVC scale
2010-05-27 11:04:48.172 rcOsirix[27712:7b03] KVC seriesDICOMUID
2010-05-27 11:04:48.173 rcOsirix[27712:7b03] KVC seriesDescription
2010-05-27 11:04:48.173 rcOsirix[27712:7b03] KVC seriesInstanceUID
2010-05-27 11:04:48.173 rcOsirix[27712:7b03] KVC seriesSOPClassUID
2010-05-27 11:04:48.174 rcOsirix[27712:7b03] KVC stateText
2010-05-27 11:04:48.174 rcOsirix[27712:7b03] KVC thumbnail
2010-05-27 11:04:48.174 rcOsirix[27712:7b03] KVC windowLevel
2010-05-27 11:04:48.175 rcOsirix[27712:7b03] KVC windowWidth
2010-05-27 11:04:48.175 rcOsirix[27712:7b03] KVC xFlipped
2010-05-27 11:04:48.176 rcOsirix[27712:7b03] KVC xOffset
2010-05-27 11:04:48.176 rcOsirix[27712:7b03] KVC yFlipped
2010-05-27 11:04:48.176 rcOsirix[27712:7b03] KVC yOffset
2010-05-27 11:04:48.177 rcOsirix[27712:7b03] KVC mountedVolume
2010-05-27 11:04:48.177 rcOsirix[27712:7b03] KVC study
2010-05-27 11:04:48.178 rcOsirix[27712:7b03] KVC images

The KVC for itemStudy is this:

2010-05-27 10:46:40.336 OsiriX[27266:a0f] KVC accessionNumber
2010-05-27 10:46:40.336 OsiriX[27266:a0f] KVC comment
2010-05-27 10:46:40.336 OsiriX[27266:a0f] KVC date
2010-05-27 10:46:40.336 OsiriX[27266:a0f] KVC dateAdded
2010-05-27 10:46:40.336 OsiriX[27266:a0f] KVC dateOfBirth
2010-05-27 10:46:40.336 OsiriX[27266:a0f] KVC dateOpened
2010-05-27 10:46:40.337 OsiriX[27266:a0f] KVC dictateURL
2010-05-27 10:46:40.337 OsiriX[27266:a0f] KVC expanded
2010-05-27 10:46:40.337 OsiriX[27266:a0f] KVC hasDICOM
2010-05-27 10:46:40.337 OsiriX[27266:a0f] KVC id
2010-05-27 10:46:40.337 OsiriX[27266:a0f] KVC institutionName
2010-05-27 10:46:40.337 OsiriX[27266:a0f] KVC lockedStudy
2010-05-27 10:46:40.337 OsiriX[27266:a0f] KVC modality
2010-05-27 10:46:40.338 OsiriX[27266:a0f] KVC name
2010-05-27 10:46:40.338 OsiriX[27266:a0f] KVC numberOfImages
2010-05-27 10:46:40.338 OsiriX[27266:a0f] KVC patientID
2010-05-27 10:46:40.338 OsiriX[27266:a0f] KVC patientSex
2010-05-27 10:46:40.338 OsiriX[27266:a0f] KVC patientUID
2010-05-27 10:46:40.338 OsiriX[27266:a0f] KVC performingPhysician
2010-05-27 10:46:40.339 OsiriX[27266:a0f] KVC referringPhysician
2010-05-27 10:46:40.339 OsiriX[27266:a0f] KVC reportURL
2010-05-27 10:46:40.339 OsiriX[27266:a0f] KVC stateText
2010-05-27 10:46:40.339 OsiriX[27266:a0f] KVC studyInstanceUID
2010-05-27 10:46:40.339 OsiriX[27266:a0f] KVC studyName
2010-05-27 10:46:40.339 OsiriX[27266:a0f] KVC windowsState
2010-05-27 10:46:40.339 OsiriX[27266:a0f] KVC albums
2010-05-27 10:46:40.340 OsiriX[27266:a0f] KVC series

If I use code:

NSDictionary *props = [[item entity] propertiesByName];
 for (NSString *s in [props allKeys]) {
  NSLog(@"KVC %@", s);
 }

Yet itemStudy throws no error if I call [itemStudy valueForKey:@"type"] when it should because there’s no KVC for @"type"!!!

Granted, the objects are different but neither of them contain the key @"type" and they both should throw errors, yet the Osirix code Tests for both conditions:

if ([[item valueForKey:@"type"] isEqualToString:@"Series"]) {
...
}
if ([[item valueForKey:@"type"] isEqualToString:@"Study"]) {
...
}

And throws no errors. Yet when I load an NSManagedObject of the same exact model and entity @"Series" it throws the ‘no key value’ when passed into the conditions above.

Am I missing something? Both the superentity and subentities of itemSeries and itemStudy are nil so they don’t inherit from something that has KVC @"type".

I’m totally at a loss as to explain what is going on.

— EDIT —

I know no one can explain what is going on… but maybe where to start looking? How would itemStudy have the extra KVC @”type” that doesn’t show up in it’s property list?

Thank you for your assistance,

-Stephen

— EDIT —

OK so after digging around more I think this is a CoreData misunderstanding on my part.

The API includes the classes DicomSeries and DicomStudy which are subclasses of NSManagedObject and are included in the xcdatamodel file.

I am including the xcdatamodel file as a “compiled source” and DicomSeries.h and DicomStudy.h

DicomSeries and DicomStudy are “hard-coded” with:

- (NSString*) type
{
    return @"Series";
}

But the objects I create for itemStudy Never call this method. Objects created like itemStudy above, do. Even DicomSeries objects called within the main program do. But not ones that I make with the fetch request from the same database.

Even if I do:

DicomSeries *itemSeries = [_context executeFetchRequest:request]

Where the request has entity @"Series" which is of Class DicomSeries so it SHOULD respond to:

[itemSeries valueForKey:@"type"];

but it doesn’t.

I feel like there’s a big giant gap of CoreData I’m missing. My NSManagedObjectModel that I’m using in my persistent Store Coordinator and my context has Entities for Series and is of managedObjectClassName DicomSeries so…

yeah.

lol, wut?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T04:35:39+00:00Added an answer on May 15, 2026 at 4:35 am

    The answer to this question was actually solved by solving my other question, here.

    Thanks for the help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 413k
  • Answers 413k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer xList already has the method you need: .ForEach(). It calls… May 15, 2026 at 8:26 am
  • Editorial Team
    Editorial Team added an answer Instead of continuously doing lookups into the InitialContext, I'm caching… May 15, 2026 at 8:26 am
  • Editorial Team
    Editorial Team added an answer Yes, your code looks good, should do the trick. May 15, 2026 at 8:26 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.