0

I've created an NSMutableArray with a class "Adealer" for it's objects. In my "listVC" I populate all the properties (as shown below) within a loop, where the "Adealer" class is used to create objects.

I then transferred one object from that array via a segue to my "detailsVC". Here I first import Adealer class and when I call this in my "detailsVC";

NSLog(@"restGPSTransfer (NSDictionary) class = %@, content is = %@",[restGPSTransfer class],[restGPSTransfer description]);

I get this;

restGPSTransfer (NSDictionary) class = Adealer, content is = 
theDealer object and it's properties:
dealerID = 7
dealerName = Uppsala Centrum Test
dealerAdressStreet = Dragarbrunnsgatan 55
dealerAdressZip = 75320
dealerAdressCity = Uppsala
dealerTel = 
dealerMail = 
dealerWeb = www.uppsala.se
dealerLogo = 
dealerImages = 
dealerText = Uppsala centrum
dealerProducts = 
dealerLongitude = 17.63893
dealerLatitude = 59.85856
dealerDistance = (null)   // This is ok
dealerDistance2 = 8586398.000000

So far so god, BUT I can't reach the above properties in a simple call like this in the "detailsVC" (?!);

self.labelRestName.text = [restGPSTransfer objectForKey:@"dealerName"];

...it crashes with the error: "-[Adealer objectForKey:]: unrecognized selector sent to instance 0x8a92db0" (then termination with InvalidArgumentExeption...)

What have I missed?

Much more detail can be found in my question here (which I still got no answers to!); How do I get out data from my NSDirectory (not just a property typo)?

Thank's for any help :-)

Community
  • 1
  • 1
Mac
  • 111
  • 1
  • 11
  • **Update:** The problem seem to be that the object I want to access is an Adealer object (NSObject) and this has the property dealerName etc. but I can't reach it from the "detailsVC". But it's visible data when I NSLog the successful transfering NSDictionary (carring the Adealer object from "listVC" --> "detailsVC"). But no one seems to know how I should adress this Adealer object to be able to get to it's properties. Any suggestions? Anyone pls? – Mac Jan 18 '13 at 09:17
  • **SOLVED!** Please see this original post here; http://stackoverflow.com/questions/14366891/how-do-i-get-out-data-from-my-nsdirectory-not-just-a-property-typo – Mac Jan 21 '13 at 10:25

1 Answers1

0

It looks like memory issue,

Are you using ARC? Could you add your dictionary allocation code?

Niralp
  • 235
  • 2
  • 4