title: How to rebind RACSignal to BOOL variable?
body: <p>I have a tree-based data structure with Node as its base class:</p>
  
  <pre><code>@interface Node : NSObject
  @property (nonatomic, weak) Node *parentNode;
  @property (nonatomic, assign) BOOL detached;
  @end
  </code></pre>
  
  <p>When <em>detached</em> variable of parent's node is equal to YES, then the same property of the child should become YES. This behaviour modelled with the following code:</p>
  
  <pre><code>@implementation Node
  
  - (void)setParentNode:(Node *)parentNode {
      _parentNode = parentNode;
      RAC(self, detached) = [RACObserve(_parentNode, detached) filter:^BOOL(id value) {
          return [value boolValue];
      }];
  }
  
  @end
  </code></pre>
  
  <p>How can I rebind <em>detached</em> property when parent is being changed? If do nothing there will be a crash in that case:</p>
  
  <pre><code>Node *node = [Node new];
  Node *parentNode = [Node new];
  Node *grandparentNode = [Node new];
  parentNode.parentNode = grandparentNode;
  node.parentNode = parentNode;
  [RACObserve(node, detached) subscribeNext:^(id x) {
      NSLog(@"node.detached: %@", x);
  }];
  Node *newParent = [Node new];
  node.parentNode = newParent;
  grandparentNode.detached = YES;
  </code></pre>
  
  <p>I have found the discussion <a href="https://github.com/ReactiveCocoa/ReactiveCocoa/issues/419" rel="nofollow">here</a> but I can not realize how to adopt solution their to my case.</p>