开发者

solution to take in other hand pointer to NSManagedObject

in first loop i was take NSManaged object

    for (NSManagedObject *carrier in carriers)
    {
       // find one necessary carrier
    }

I need a transfer finded carrier object to second loop to using it for build inverse relationship. I tryed to declare

NSManagedObject *currentCarrier;

and make

currentCarrier = carrier;

but has a error [NSManagedObject copyWithZone:]: unrecognized selector sent to instance 0x1a98190

what is correct way to make transfer?

SOLUTION

Main issue what i can't directly using NSString object in forKey: Bellow is a code, which working fine if u have to using external开发者_开发问答 string forKey:

[destinstionsListForSale setValue:importRowElement forKey:[NSString stringWithFormat:@"%@",importRowsName]];


you may have a scope error:

for (NSManagedObject *carrier in carriers)
{
   // find one necessary carrier
}
NSManagedObject *currentCarrier;
currentCarrier = carrier;

Try this?

NSManagedObject *currentCarrier;
for (NSManagedObject *carrier in carriers)
{
   // find one necessary carrier
   currentCarrier = carrier;
}

I can't tell without more code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜