Re: CoreData Entity attributes vs. Cocoa naming conventions
Re: CoreData Entity attributes vs. Cocoa naming conventions
- Subject: Re: CoreData Entity attributes vs. Cocoa naming conventions
- From: Bill Cheeseman <email@hidden>
- Date: Mon, 07 Nov 2005 18:23:39 -0500
- Thread-topic: CoreData Entity attributes vs. Cocoa naming conventions
on 2005-11-07 2:33 PM, Jim Correia at email@hidden wrote:
> If I try to apply this convention to my CoreData entities (for
> example, if I have an entity with a URLString attribute) the data
> modeler barks at me and says that attribute names must begin with a
> lowercase letter.
>
> Obviously this isn't the end of the world, but setUrlString: is
> uglier than setURLString:. Is the UI being overzealous, or enforcing
> a hard requirement down inside the frameworks? (Or should I just get
> over it - as I have had to do - and just give my accessor and
> attribute the "ugly" name? :-)
I used to get an error message (or maybe it was a log entry, I forget)
straight out of the heart of Cocoa, a few years ago, when using method names
that started with capital letters. I had the impression -- perhaps my
imagination -- that it was left over from NeXT days. I complained in a Radar
bug, and it eventually went away in a system revision. I haven't previously
noticed the documentation you quoted, but I take it as validation of my bug
report.
The problem I had was that Key-Value Coding is useful when executing methods
who names are returned by accessibility API functions that return string
constants. The accessibility string constants all start with "AX", so I had
a bunch of methods named "AXThis" and "AXThat". I was pretty sure there must
be other circumstances where this could be an issue, and it look like you've
just found one.
There was no workaround for me because I didn't have the power to change the
string constants that were returned by the accessibility API, so I just
lived with the error messages. I'll bet the Core Data folks will wake up to
this issue pretty soon, too, so if I were you I would ignore the messages
and do it your way. And file a bug against Core Data.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden