core-data icon indicating copy to clipboard operation
core-data copied to clipboard

Avoid duplicating keys in will/did method calls.

Open dillof opened this issue 9 years ago • 0 comments

Add accessingValueForKey() that takes a key and a block and wraps the block in willAccessValueForKey()/didAccessValueForKey(); same for willChangeValueForKey()/didChangeValueForKey().

This allows writing:

var foo {
    return accessingValueForKey(Keys.Foo) { primitiveFoo }
}

dillof avatar May 25 '16 23:05 dillof