> On 7 Apr 2015, at 23:12, Alex Zavatone <[email protected]> wrote:
> 
> To answer my own question, changing the enum to an NSInteger backed NS_Enum 
> resulted in no more bad access exceptions from other chunks of code 
> attempting to change the APP_State property.
> 
> typedef NS_ENUM(NSInteger, APP_State) {
>    APP_State_Normal = 0,
>    APP_State_Expired = 1,
>    APP_State_Waiting = 2
> };
> 
> Changing the atomicity of the exposed property had no effect on whether the 
> exception was issued or not.
> 
> Hope this helps someone.
> 
> Alex Zavatone
> 

I was just looking at some of my own code because I’m pretty sure I use enums 
all the time in properties which are KVO and observe them and update them, and 
I’ve never once had to mess around with NS_ENUM to make them work. 

And indeed I found 4 examples quite quickly, all of which look very much like 
your original code, a typedef’ed enum used as a property. 

So I really don’t know where your bad accesses were coming from. 

This was all ObjC right ? 

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to