Re: Does Core Data have reserved Entity names?
Alex Reynolds wrote: Unfortunately, that simple solution means parting ways with the naming scheme of the source I'm pulling data from and changing the naming scheme for all my other entities/classes, too, which I was hoping to avoid. But thanks to all for the confirmation. Maybe: #define Object AlexObject imported into every source file. It's BF&I, but surprisingly effective at times. -- GG ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Does Core Data have reserved Entity names?
On Sep 30, 2009, at 1:11 PM, Alex Reynolds wrote: Unfortunately, that simple solution means parting ways with the naming scheme of the source I'm pulling data from and changing the naming scheme for all my other entities/classes, too, which I was hoping to avoid. But thanks to all for the confirmation. I hear you, but ... "them's the breaks" I'm afraid. Such a basic name is sure to collide. I doubt it's as complex a problem as you're making it out to be, though: 1 - Renaming a class is easy to do with the refactoring tool in Xcode and choosing another entity name can't be *that* earth-shattering. The hardest part is finding any places you've referenced the entity by name (-insertEntityForName:...) and replacing them with the new name. 2 - Just because it's not called "Object" in the object model doesn't mean you can't call it "Object" in the user interface ... -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Does Core Data have reserved Entity names?
As a general rule, you want to avoid attempting to name classes with such generic names. It makes you very much more likely to end up with a class name conflict somewhere, especially in large projects. Classname prefixes are usually what's used to help ensure there are no such conflicts. - Bryan On Sep 30, 2009, at 1:11:06 PM, Alex Reynolds wrote: On Sep 30, 2009, at 4:04 AM, I. Savant wrote: Whatever the answer, the simple solution is to change your entity's name. Unfortunately, that simple solution means parting ways with the naming scheme of the source I'm pulling data from and changing the naming scheme for all my other entities/classes, too, which I was hoping to avoid. But thanks to all for the confirmation. -Alex ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/bryanhenry%40mac.com This email sent to bryanhe...@mac.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Does Core Data have reserved Entity names?
On Sep 30, 2009, at 4:04 AM, I. Savant wrote: Whatever the answer, the simple solution is to change your entity's name. Unfortunately, that simple solution means parting ways with the naming scheme of the source I'm pulling data from and changing the naming scheme for all my other entities/classes, too, which I was hoping to avoid. But thanks to all for the confirmation. -Alex ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Does Core Data have reserved Entity names?
On Sep 30, 2009, at 3:53 AM, Alex Reynolds wrote: After I added an Entity called "Object", I get the following message when executing my application on the iPhone: objc[4219]: Class Object is implemented in both /usr/lib/ libobjc.A.dylib and /var/mobile/Applications/BFDFC14C-DB60-44BB-8118- D2AAB39E2EE6/MyApp.app/MyApp. One of the two will be used. Which one is undefined. "Object" is the "original" root class in Objective-C. ObjC allows multiple root classes but Apple's implementation uses NSObject. It appears "Object" is still available somewhere, though. I remember reading about it years ago but I can only find references to this fact and not a clear statement of the fact itself. Hate it when that happens. Whatever the answer, the simple solution is to change your entity's name. -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Does Core Data have reserved Entity names?
This doesn't sound directly like a Core Data problem as such. Note how the message mentions nothing about entities, but instead is complaining you've got two separate classes with the same name. So you should be fine to have an entity named "Object" but don't make the classname that. Call it "ARObject" or something. On 30 Sep 2009, at 08:53, Alex Reynolds wrote: After I added an Entity called "Object", I get the following message when executing my application on the iPhone: objc[4219]: Class Object is implemented in both /usr/lib/ libobjc.A.dylib and /var/mobile/Applications/BFDFC14C-DB60-44BB-8118- D2AAB39E2EE6/MyApp.app/MyApp. One of the two will be used. Which one is undefined. Is "Object" a reserved name for a Core Data Entity on an iPhone? I don't see this message when I execute my application on the Simulator. Thanks, Alex ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net This email sent to cocoa...@mikeabdullah.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com