anchor.diff:  
   procedure TDbOutlnApp.OnChooseType(val:variant);
     begin dbc.RunSQL(
  -    'UPDATE node SET knd=:knd WHERE nid=:nid', [val, curs['nid']]);
  +    'UPDATE node SET knd=:knd WHERE nid=:nid', [val, cur['nid']]);
     end;
    
  -procedure TDbOutCursor.Toggle;
  +procedure TDbOutLnApp.OnToggle;
     var olid, nid : integer; sql : TStr;
     begin
  -    ToMark;
  -    olid := _rs['olid'];
  -    nid  := _rs['nid'];
  -    if _rs['collapsed'] then
  -      sql := 'delete from outline_collapse where olid= :olid ' +
  -	     'and collapse = :nid '
  +    olid := cur['olid']; nid  := cur['nid'];
  +    if cur['collapsed'] then sql :=
  +      'delete from outline_collapse where olid= :olid and collapse = :nid'
       else sql := 'insert into outline_collapse values (:olid, :nid)';
  -    _rs.dbc.RunSQL(sql, [olid, nid]);
  -    SetMark(_mk);
  +    dbc.RunSQL(sql, [olid, nid]);
  +    rsOutln.Open; treegrid.redraw; // refresh the data and display
     end;
   
   
positive.code:     rsOutln := dbc.query(
        'SELECT olid, nid, kind, node, depth, collapsed, hidden, leaf '+
          'FROM outline');
      curs := TDbOutCursor.Create(dbc);
      curs.Attach(rsOutln, 'nid');
      curs.canHideRows := true; curs.hideFlag := 'hidden';
      curs.OnMarkChanged := self.OnCursorChange;
  
      // TODO: eventually i'll build a little lazarus-like RAD thing
      // to manage these components as data rather than code.
  
negative.code: procedure TDbOutlnApp.Redraw;
    begin
      bg('k'); fg('K'); fillscreen('!@#$%^&*(){}][/=+?-_;:');
      treegrid.Redraw;
    end;
  
  procedure TDbOutlnApp.OnCursorChange( Sender : TObject );
    begin
      treegrid.Redraw;
    end;
  
  