Skip navigation.
 
mlRe: NSControl/NSCell: archiving vs. bindings and target/action
FROM : Ken Ferry
DATE : Tue Aug 01 07:20:45 2006

Hi Jim,

On 7/30/06, Jim Correia <jim.<email_removed>> wrote:
> Does the documentation discuss what specifically happens to bindings
> and target/action of an NSControl or an NSCell as it is round tripped
> through NSKeyedArchiver?


Not that I can remember.. file bugs, please?

> Absent that, would someone be kind enough to confirm or correct these
> observations?
>
> Bindings don't appear to survive the round trip through the archive.
>
> The target is conditionally encoded, so it's survival depends upon
> whether the target object was included in the archive.


Correct on all counts.

If you do need to duplicate view hierarchies with bindings intact,
you're best off instantiating a nib multiple times.  Failing that, you
can use exposedBindings and infoForBinding: to get bindings
information, and -bind:toObject:withKeyPath:options: to set the
gathered information on new objects.

-Ken

Related mailsAuthorDate
mlNSControl/NSCell: archiving vs. bindings and target/action Jim Correia Jul 31, 03:24
mlRe: NSControl/NSCell: archiving vs. bindings and target/action Ken Ferry Aug 1, 07:20