# File lib/foxtails/FTFileBrowser.rb, line 102
    def connect_to_target
      # The order of the two when_ clauses is significant: this way, when self
      # and target are created, the target's directory propagetes to self,
      # instead of vice versa. (This is the only gotcha with circular
      # observables.)
      when_target_state CHANGES do |dir|
        self.directory = dir
      end

      when_directory CHANGES do |dir|
        self.can_go_up = (dir != File.dirname(dir))
        self.can_write = File.writable?(dir)
          # note that the above two are not updated as the file system changes
          # (unlike FXFileSelector)
        set_target_state(dir)
        setHelpText(dir)
      end
    end