开发者

Attribute called 'description' causes crash

开发者 https://www.devze.com 2023-01-06 19:37 出处:网络
I just started playing with Core Data. I开发者_如何学JAVA created an entity called Task with a property called Description. I opened Interface Builder and I added Core Data Entity view.

I just started playing with Core Data.

I开发者_如何学JAVA created an entity called Task with a property called Description. I opened Interface Builder and I added Core Data Entity view.

Picked my entity, property and tried to build the application. After clicking on "Add" button it crashed with EXC_BAD_ACCESS.

After I've renamed this attribute to 'desc' it works fine.

Can anyone explain me why is this happening? Is 'description' some kind of reserved word in Core Data or something?


description is ann Objective-C property used for debugging and goes all the way down to Core Foundation, which has a corresponding CFDescription function. You should just name that property something else.


It's a method with a particular purpose in Cocoa, and Core Data dislikes it being overridden. More here.

0

精彩评论

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