Page 1 of 1
					
				another bug
				Posted: Fri Jan 25, 2008 2:52 am
				by toolwiz
				In the Actions Demo, just below the right-hand scrollbar, there's a little widget that has an up-arrow, a little circle, and a down-arrow.  When you click the little circle, a small menu appears.  The bottom half of that menu says "Cancel".  If you click the "Cancel" link, it brings up a GPF -- attempt to read memory at 0.
-David
			 
			
					
				
				Posted: Fri Jan 25, 2008 4:29 am
				by proxy3d
				I know about this mistake. In new versions the bug is corrected.
ActionTest
// Button on the tool window is clicked
procedure TForm3.srvtlwndw1ClickButton(Sender: TObject;
  ToolButton: TSRVToolButton);
var
     s: String;
     posit: Integer;
begin
  VToolButton := ToolButton;
  if ToolButton = nil then Exit; // Adding
  if ToolButton.Index = 6 then // starting text search
    begin
      SRichViewEdit1.SetFocus;
      fd.CloseDialog;
      if SRichViewEdit1.RichViewEdit.SelectionExists then
        begin
          s := SRichViewEdit1.RichViewEdit.GetSelText;
          posit := Pos(#13,s);
          if posit<>0 then
            s := Copy(s,1,posit-1);
          fd.FindText := s;
        end;
      fd.Execute;
    end
  else // starting search
    SRichViewEdit1VMenuClickButton(Sender,
      TSRVToolButton(SRichViewEdit1.MenuVButtons.Items[2]));
end;