title: Privileged Instruction when calling "Cancel" on a client dataset
body: <p>This is a really interesting error indeed :)
  I have a child form inheriting from a base form.
  The base form provides all sorts of virtual;abstract; services for use by children.
  This form uses all of them :) one of the services is a Save/Cancel system, which is coded in this way in the base form:</p>
  
  <pre>
  procedure TBaseRecordFrm.ConfirmSave(AVal: Boolean);
  begin
    if AVal then
      PerformSave
    else
      PerformCancel;
    Close;
  end;
  </pre>
  
  <p>The inherited form does something quite simple: in the Ok and Cancel button calls ConfirmSave with the appropriate parameter(True/False).
  The code for the two methods is pretty straight-forward:</p>
  
  <pre>
  procedure TActionFrm.PerformCancel;
  begin
    if DMMain.CDSActionItems.State in dsEditModes then
      DMMain.CDSActionItems.Cancel;
  end;
  
  procedure TActionFrm.PerformSave;
  begin
    if DMMain.CDSActionItems.State in dsEditModes then
      DMMain.CDSActionItems.Post;
  end;
  </pre>
  
  <p>When pressing "Cancel", I get a "Privileged Instruction" exception.
  I am not doing anything spectacular as far as I can see.
  Anybody can shed some light, please? :)</p>
  
  <p>Thank you!</p>
  
  <p>Andrea</p>