Type Method

valueForKey:

Returns the object previously associated with the current transaction using the specified key.

Declaration

+ (id)valueForKey:(NSString *)key;

Parameters

key

The unique string identifying an object previously associated with the transaction.

Return Value

The object previously associated with the transaction (or an enclosing transaction) using the specified key, or nil if no value for that key could be found.

Discussion

Nested transactions have nested data scope. Setting a value for a key associates it with the current transaction (or innermost nested transaction) only, but reading the value for a key searches through nested transactions (starting from the innermost).

See Also

Getting and Setting Transaction Properties

+ setValue:forKey:

Associates an arbitrary object with the current transaction using the specified key.