mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 04:48:36 +02:00
Debugger: Add some feedback in the eval/modify dialog.
git-svn-id: trunk@47386 -
This commit is contained in:
parent
35b20a6180
commit
c276a8b998
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user