mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 03:59:12 +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';
|
drsUseInstanceClassType = 'Use Instance class type';
|
||||||
drsLen = 'Len=%d: ';
|
drsLen = 'Len=%d: ';
|
||||||
|
synfNewValueIsEmpty = '"New value" is empty';
|
||||||
|
synfTheDebuggerWasNotAbleToModifyTheValue = 'The debugger was not able to modify the value';
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|||||||
@ -39,7 +39,7 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, LCLType, Forms,
|
Classes, SysUtils, LCLType, Forms,
|
||||||
IDEWindowIntf, IDEImagesIntf, DbgIntfDebuggerBase, LazarusIDEStrConsts,
|
IDEWindowIntf, IDEImagesIntf, DbgIntfDebuggerBase, LazarusIDEStrConsts,
|
||||||
ComCtrls, StdCtrls, Menus, DebuggerDlg, BaseDebugManager,
|
ComCtrls, StdCtrls, Menus, Dialogs, DebuggerDlg, BaseDebugManager,
|
||||||
InputHistory, IDEProcs, Debugger, DebuggerStrConst;
|
InputHistory, IDEProcs, Debugger, DebuggerStrConst;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -253,7 +253,11 @@ begin
|
|||||||
S := Trim(cmbExpression.Text);
|
S := Trim(cmbExpression.Text);
|
||||||
if S = '' then Exit;
|
if S = '' then Exit;
|
||||||
V := cmbNewValue.Text;
|
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
|
if cmbNewValue.Items.IndexOf(V) = -1
|
||||||
then cmbNewValue.Items.Insert(0, V);
|
then cmbNewValue.Items.Insert(0, V);
|
||||||
@ -326,6 +330,10 @@ end;
|
|||||||
|
|
||||||
procedure TEvaluateDlg.tbModifyClick(Sender: TObject);
|
procedure TEvaluateDlg.tbModifyClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
if cmbNewValue.Text = '' then begin
|
||||||
|
MessageDlg(lisCCOErrorCaption, synfNewValueIsEmpty, mtError, [mbOK], 0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
Modify;
|
Modify;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user