Skip to content

Add constant structs for the property names #72

Merged
merged 1 commit into from Aug 30, 2011

4 participants

@danielctull

Sampling Mike Ash's post about namespaced constants (http://www.mikeash.com/pyblog/friday-qa-2011-08-19-namespaced-constants-and-functions.html), this adds the generation of constant structs to access the attribute, relationship and fetched property names. This makes sure that when you're creating a fetch request, you can use these values to guarantee their existence.

@danielctull danielctull Add constant structs for the property names
Sampling Mike Ash's post about namespaced constants (http://www.mikeash.com/pyblog/friday-qa-2011-08-19-namespaced-constants-and-functions.html), this adds the generation of constant structs to access the attribute, relationship and fetched property names. This makes sure that when you're creating a fetch request, you can use these values to guarantee their existence.
cd9dcb8
@extremeboredom

Sounds like an awesome addition, looking forward to using it.

Should it be optionally enabled perhaps, instead of always on? Should be simple with template vars.

@danielctull

I did wonder whether it should be optional, though I can't see too much harm in generating them and not using them, especially if it removes a preference. (Though I know the command line types love options!)

@rentzsch rentzsch merged commit 778bf54 into rentzsch:master Aug 30, 2011
@rentzsch
Owner

I'm going to have it always-on. I don't see a big win being able to turn it off.

@jdmuys
jdmuys commented Dec 8, 2011

These added structs are incompatible with ARC. I get compiler errors "error: ARC forbids Objective-C objects in structs or unions"

@danielctull

Are you using the ARC flag (--template-var arc=true)? I've been using them solely with ARC since August. :)

@rentzsch
Owner
rentzsch commented Dec 8, 2011

@jdmuys, @danielctull thanks for clearing this up, it will go in v1.24's changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.