Debugger: Add some feedback in the eval/modify dialog.

git-svn-id: trunk@47386 -
This commit is contained in:
martin 2015-01-14 18:11:05 +00:00
parent 35b20a6180
commit c276a8b998
2 changed files with 12 additions and 2 deletions

View File

@ -76,6 +76,8 @@ resourcestring
drsUseInstanceClassType = 'Use Instance class type';
drsLen = 'Len=%d: ';
synfNewValueIsEmpty = '"New value" is empty';
synfTheDebuggerWasNotAbleToModifyTheValue = 'The debugger was not able to modify the value';
implementation

View File

@ -39,7 +39,7 @@ interface
uses
Classes, SysUtils, LCLType, Forms,
IDEWindowIntf, IDEImagesIntf, DbgIntfDebuggerBase, LazarusIDEStrConsts,
ComCtrls, StdCtrls, Menus, DebuggerDlg, BaseDebugManager,
ComCtrls, StdCtrls, Menus, Dialogs, DebuggerDlg, BaseDebugManager,
InputHistory, IDEProcs, Debugger, DebuggerStrConst;
type
@ -253,7 +253,11 @@ begin
S := Trim(cmbExpression.Text);
if S = '' then Exit;
V := cmbNewValue.Text;
if not DebugBoss.Modify(S, V) then Exit;
if not DebugBoss.Modify(S, V) then begin
MessageDlg(lisCCOErrorCaption, synfTheDebuggerWasNotAbleToModifyTheValue, mtError, [mbOK],
0);
Exit;
end;
if cmbNewValue.Items.IndexOf(V) = -1
then cmbNewValue.Items.Insert(0, V);
@ -326,6 +330,10 @@ end;
procedure TEvaluateDlg.tbModifyClick(Sender: TObject);
begin
if cmbNewValue.Text = '' then begin
MessageDlg(lisCCOErrorCaption, synfNewValueIsEmpty, mtError, [mbOK], 0);
exit;
end;
Modify;
end;