objective c - retain (or strong) attribute does not match the property inherited from nswindowcontroller -


when made app (non arc) 10.10 os x compatible getting warning property

@property (nonatomic, retain) masterdocument *document;

where masterdocument of type nsdocument.

and getting warning as

retain (or strong)' attribute on property 'document' not match property inherited nswindowcontroller.

also getting warning same property :

'atomic' attribute on property 'document' not match property inherited nswindowcontroller.**

can suggest me reason warning , how clear this.

you've created subclass of nswindowcontroller , you're adding property exists on parent class.

you're getting warning because you're changing definition of existing property, fact you're changing memory management assign retain.

the second warning because you're changing access atomic nonatomic.

the original property (according docs) is:

@property(assign) id document 

you omit redeclaring property , use existing one, or, @ least use same settings such as:

@property (assign) masterdocument *document; 

note of course you'll using assign , not retain or strong make sure handle memory correctly.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -