You've already forked lazarus-ccr
proc editor bug fix
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@777 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -118,6 +118,7 @@
|
||||
<Filename Value="uprocedit.pas"/>
|
||||
<ComponentName Value="fProcEdit"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="uprocedit"/>
|
||||
</Unit13>
|
||||
<Unit14>
|
||||
|
@ -3,14 +3,13 @@ object fProcEdit: TfProcEdit
|
||||
Height = 543
|
||||
Top = 118
|
||||
Width = 522
|
||||
HorzScrollBar.Page = 521
|
||||
VertScrollBar.Page = 542
|
||||
ActiveControl = edtName
|
||||
BorderStyle = bsSizeToolWin
|
||||
Caption = 'fProcEdit'
|
||||
ClientHeight = 543
|
||||
ClientWidth = 522
|
||||
Position = poMainFormCenter
|
||||
LCLVersion = '0.9.26.2'
|
||||
object PageControl1: TPageControl
|
||||
Height = 493
|
||||
Width = 522
|
||||
@ -75,9 +74,9 @@ object fProcEdit: TfProcEdit
|
||||
end
|
||||
object edtFunction: TCheckBox
|
||||
Left = 12
|
||||
Height = 13
|
||||
Height = 17
|
||||
Top = 74
|
||||
Width = 96
|
||||
Width = 94
|
||||
Caption = 'Function returns'
|
||||
OnClick = edtFunctionClick
|
||||
OnEditingDone = edtFunctionEditingDone
|
||||
@ -89,9 +88,7 @@ object fProcEdit: TfProcEdit
|
||||
Top = 74
|
||||
Width = 388
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
|
||||
ItemHeight = 13
|
||||
MaxLength = 0
|
||||
Style = csDropDownList
|
||||
TabOrder = 2
|
||||
end
|
||||
|
@ -2,54 +2,53 @@
|
||||
|
||||
LazarusResources.Add('TfProcEdit','FORMDATA',[
|
||||
'TPF0'#10'TfProcEdit'#9'fProcEdit'#4'Left'#3'"'#1#6'Height'#3#31#2#3'Top'#2'v'
|
||||
+#5'Width'#3#10#2#18'HorzScrollBar.Page'#3#9#2#18'VertScrollBar.Page'#3#30#2
|
||||
+#13'ActiveControl'#7#7'edtName'#11'BorderStyle'#7#13'bsSizeToolWin'#7'Captio'
|
||||
+'n'#6#9'fProcEdit'#12'ClientHeight'#3#31#2#11'ClientWidth'#3#10#2#8'Position'
|
||||
+#7#16'poMainFormCenter'#0#12'TPageControl'#12'PageControl1'#6'Height'#3#237#1
|
||||
+#5'Width'#3#10#2#10'ActivePage'#7#9'TabSheet1'#5'Align'#7#8'alClient'#8'TabI'
|
||||
+'ndex'#2#0#8'TabOrder'#2#0#0#9'TTabSheet'#9'TabSheet1'#7'Caption'#6#10'&Oper'
|
||||
+'ation'#12'ClientHeight'#3#211#1#11'ClientWidth'#3#2#2#0#6'TLabel'#6'Label1'
|
||||
+#4'Left'#2#12#6'Height'#2#14#3'Top'#2#26#5'Width'#2#28#7'Caption'#6#4'Name'
|
||||
+#11'ParentColor'#8#0#0#5'TEdit'#7'edtName'#4'Left'#2'p'#6'Height'#2#23#3'Top'
|
||||
+#2#26#5'Width'#3#132#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOr'
|
||||
+'der'#2#0#4'Text'#6#7'edtName'#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#2#11#6
|
||||
+'Height'#3'0'#1#3'Top'#2'r'#5'Width'#3#233#1#7'Anchors'#11#5'akTop'#6'akLeft'
|
||||
+#7'akRight'#8'akBottom'#0#7'Caption'#6#15' Parametters '#12'ClientHeight'#3
|
||||
+#30#1#11'ClientWidth'#3#229#1#8'TabOrder'#2#3#0#9'TListView'#9'edtParams'#6
|
||||
+'Height'#3#30#1#5'Width'#3#229#1#5'Align'#7#8'alClient'#7'Columns'#14#1#7'Ca'
|
||||
+'ption'#6#4'Name'#5'Width'#3#180#0#0#1#7'Caption'#6#4'Type'#5'Width'#3#190#0
|
||||
+#0#1#7'Caption'#6#8'Modifier'#5'Width'#2'<'#0#1#0#0#9'RowSelect'#9#8'TabOrde'
|
||||
+'r'#2#0#9'ViewStyle'#7#8'vsReport'#0#0#0#9'TCheckBox'#11'edtFunction'#4'Left'
|
||||
+#2#12#6'Height'#2#13#3'Top'#2'J'#5'Width'#2'`'#7'Caption'#6#16'Function retu'
|
||||
+'rns'#7'OnClick'#7#16'edtFunctionClick'#13'OnEditingDone'#7#22'edtFunctionEd'
|
||||
+'itingDone'#8'TabOrder'#2#1#0#0#9'TComboBox'#13'edtResultType'#4'Left'#2'p'#6
|
||||
+'Height'#2#21#3'Top'#2'J'#5'Width'#3#132#1#7'Anchors'#11#5'akTop'#6'akLeft'#7
|
||||
+'akRight'#0#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSearc'
|
||||
+'hAscending'#0#10'ItemHeight'#2#13#9'MaxLength'#2#0#5'Style'#7#14'csDropDown'
|
||||
+'List'#8'TabOrder'#2#2#0#0#7'TButton'#7'Button3'#4'Left'#2#12#6'Height'#2#25
|
||||
+#3'Top'#3#173#1#5'Width'#2'l'#6'Action'#7#9'actNewArg'#7'Anchors'#11#6'akLef'
|
||||
+'t'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#4#0#0#7'TB'
|
||||
+'utton'#7'Button4'#4'Left'#3#132#0#6'Height'#2#25#3'Top'#3#173#1#5'Width'#2
|
||||
+'l'#6'Action'#7#17'actUpdateArgument'#7'Anchors'#11#6'akLeft'#8'akBottom'#0
|
||||
+#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#5#0#0#7'TButton'#7'Button5'
|
||||
+#4'Left'#3#248#0#6'Height'#2#25#3'Top'#3#173#1#5'Width'#2'l'#6'Action'#7#17
|
||||
+'actDeleteArgument'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#25'BorderSpacing.I'
|
||||
+'nnerBorder'#2#4#8'TabOrder'#2#6#0#0#0#0#6'TPanel'#6'Panel1'#6'Height'#2'2'#3
|
||||
+'Top'#3#237#1#5'Width'#3#10#2#5'Align'#7#8'alBottom'#12'ClientHeight'#2'2'#11
|
||||
+'ClientWidth'#3#10#2#8'TabOrder'#2#1#0#7'TButton'#7'Button1'#4'Left'#3'X'#1#6
|
||||
+'Height'#2#25#3'Top'#2#11#5'Width'#2'K'#6'Action'#7#5'actOk'#7'Anchors'#11#5
|
||||
+'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#4#7'Default'#9#8'TabOrd'
|
||||
+'er'#2#0#0#0#7'TButton'#7'Button2'#4'Left'#3#176#1#6'Height'#2#25#3'Top'#2#11
|
||||
+#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBor'
|
||||
+'der'#2#4#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'
|
||||
+#2#1#0#0#0#11'TActionList'#2'AL'#4'left'#3#198#0#3'top'#3#241#0#0#7'TAction'
|
||||
+#5'actOk'#7'Caption'#6#2'OK'#18'DisableIfNoHandler'#9#9'OnExecute'#7#12'actO'
|
||||
+'kExecute'#8'OnUpdate'#7#11'actOkUpdate'#0#0#7'TAction'#9'actNewArg'#7'Capti'
|
||||
+'on'#6#12'New Argument'#18'DisableIfNoHandler'#9#9'OnExecute'#7#16'actNewArg'
|
||||
+'Execute'#0#0#7'TAction'#17'actUpdateArgument'#7'Caption'#6#13'Edit Argument'
|
||||
+#18'DisableIfNoHandler'#9#9'OnExecute'#7#24'actUpdateArgumentExecute'#8'OnUp'
|
||||
+'date'#7#23'actUpdateArgumentUpdate'#0#0#7'TAction'#17'actDeleteArgument'#7
|
||||
+'Caption'#6#15'Delete Argument'#18'DisableIfNoHandler'#9#9'OnExecute'#7#24'a'
|
||||
+'ctDeleteArgumentExecute'#8'OnUpdate'#7#23'actUpdateArgumentUpdate'#0#0#0#10
|
||||
+'TPopupMenu'#10'PopupMenu1'#4'left'#2'S'#3'top'#3#217#0#0#0#0
|
||||
+#5'Width'#3#10#2#13'ActiveControl'#7#7'edtName'#11'BorderStyle'#7#13'bsSizeT'
|
||||
+'oolWin'#7'Caption'#6#9'fProcEdit'#12'ClientHeight'#3#31#2#11'ClientWidth'#3
|
||||
+#10#2#8'Position'#7#16'poMainFormCenter'#10'LCLVersion'#6#8'0.9.26.2'#0#12'T'
|
||||
+'PageControl'#12'PageControl1'#6'Height'#3#237#1#5'Width'#3#10#2#10'ActivePa'
|
||||
+'ge'#7#9'TabSheet1'#5'Align'#7#8'alClient'#8'TabIndex'#2#0#8'TabOrder'#2#0#0
|
||||
+#9'TTabSheet'#9'TabSheet1'#7'Caption'#6#10'&Operation'#12'ClientHeight'#3#211
|
||||
+#1#11'ClientWidth'#3#2#2#0#6'TLabel'#6'Label1'#4'Left'#2#12#6'Height'#2#14#3
|
||||
+'Top'#2#26#5'Width'#2#28#7'Caption'#6#4'Name'#11'ParentColor'#8#0#0#5'TEdit'
|
||||
+#7'edtName'#4'Left'#2'p'#6'Height'#2#23#3'Top'#2#26#5'Width'#3#132#1#7'Ancho'
|
||||
+'rs'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#0#4'Text'#6#7'edtName'
|
||||
+#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#2#11#6'Height'#3'0'#1#3'Top'#2'r'#5'W'
|
||||
+'idth'#3#233#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#7'C'
|
||||
+'aption'#6#15' Parametters '#12'ClientHeight'#3#30#1#11'ClientWidth'#3#229
|
||||
+#1#8'TabOrder'#2#3#0#9'TListView'#9'edtParams'#6'Height'#3#30#1#5'Width'#3
|
||||
+#229#1#5'Align'#7#8'alClient'#7'Columns'#14#1#7'Caption'#6#4'Name'#5'Width'#3
|
||||
+#180#0#0#1#7'Caption'#6#4'Type'#5'Width'#3#190#0#0#1#7'Caption'#6#8'Modifier'
|
||||
+#5'Width'#2'<'#0#1#0#0#9'RowSelect'#9#8'TabOrder'#2#0#9'ViewStyle'#7#8'vsRep'
|
||||
+'ort'#0#0#0#9'TCheckBox'#11'edtFunction'#4'Left'#2#12#6'Height'#2#17#3'Top'#2
|
||||
+'J'#5'Width'#2'^'#7'Caption'#6#16'Function returns'#7'OnClick'#7#16'edtFunct'
|
||||
+'ionClick'#13'OnEditingDone'#7#22'edtFunctionEditingDone'#8'TabOrder'#2#1#0#0
|
||||
+#9'TComboBox'#13'edtResultType'#4'Left'#2'p'#6'Height'#2#21#3'Top'#2'J'#5'Wi'
|
||||
+'dth'#3#132#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#10'ItemHeight'#2
|
||||
+#13#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#2#0#0#7'TButton'#7'Button3'#4
|
||||
+'Left'#2#12#6'Height'#2#25#3'Top'#3#173#1#5'Width'#2'l'#6'Action'#7#9'actNew'
|
||||
+'Arg'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4
|
||||
+#8'TabOrder'#2#4#0#0#7'TButton'#7'Button4'#4'Left'#3#132#0#6'Height'#2#25#3
|
||||
+'Top'#3#173#1#5'Width'#2'l'#6'Action'#7#17'actUpdateArgument'#7'Anchors'#11#6
|
||||
+'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#5#0#0
|
||||
+#7'TButton'#7'Button5'#4'Left'#3#248#0#6'Height'#2#25#3'Top'#3#173#1#5'Width'
|
||||
+#2'l'#6'Action'#7#17'actDeleteArgument'#7'Anchors'#11#6'akLeft'#8'akBottom'#0
|
||||
+#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#6#0#0#0#0#6'TPanel'#6'Panel'
|
||||
+'1'#6'Height'#2'2'#3'Top'#3#237#1#5'Width'#3#10#2#5'Align'#7#8'alBottom'#12
|
||||
+'ClientHeight'#2'2'#11'ClientWidth'#3#10#2#8'TabOrder'#2#1#0#7'TButton'#7'Bu'
|
||||
+'tton1'#4'Left'#3'X'#1#6'Height'#2#25#3'Top'#2#11#5'Width'#2'K'#6'Action'#7#5
|
||||
+'actOk'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#4
|
||||
+#7'Default'#9#8'TabOrder'#2#0#0#0#7'TButton'#7'Button2'#4'Left'#3#176#1#6'He'
|
||||
+'ight'#2#25#3'Top'#2#11#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#25
|
||||
+'BorderSpacing.InnerBorder'#2#4#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalR'
|
||||
+'esult'#2#2#8'TabOrder'#2#1#0#0#0#11'TActionList'#2'AL'#4'left'#3#198#0#3'to'
|
||||
+'p'#3#241#0#0#7'TAction'#5'actOk'#7'Caption'#6#2'OK'#18'DisableIfNoHandler'#9
|
||||
+#9'OnExecute'#7#12'actOkExecute'#8'OnUpdate'#7#11'actOkUpdate'#0#0#7'TAction'
|
||||
+#9'actNewArg'#7'Caption'#6#12'New Argument'#18'DisableIfNoHandler'#9#9'OnExe'
|
||||
+'cute'#7#16'actNewArgExecute'#0#0#7'TAction'#17'actUpdateArgument'#7'Caption'
|
||||
+#6#13'Edit Argument'#18'DisableIfNoHandler'#9#9'OnExecute'#7#24'actUpdateArg'
|
||||
+'umentExecute'#8'OnUpdate'#7#23'actUpdateArgumentUpdate'#0#0#7'TAction'#17'a'
|
||||
+'ctDeleteArgument'#7'Caption'#6#15'Delete Argument'#18'DisableIfNoHandler'#9
|
||||
+#9'OnExecute'#7#24'actDeleteArgumentExecute'#8'OnUpdate'#7#23'actUpdateArgum'
|
||||
+'entUpdate'#0#0#0#10'TPopupMenu'#10'PopupMenu1'#4'left'#2'S'#3'top'#3#217#0#0
|
||||
+#0#0
|
||||
]);
|
||||
|
@ -117,8 +117,10 @@ var
|
||||
i : Integer;
|
||||
locProc : TPasProcedure;
|
||||
memberList : TList;
|
||||
locName : string;
|
||||
begin
|
||||
b := ( not IsStrEmpty(edtName.Text) ) and
|
||||
locName := edtName.Text;
|
||||
b := ( not IsStrEmpty(locName) ) and
|
||||
( ( not edtFunction.Checked ) or ( edtResultType.ItemIndex > -1 ) );
|
||||
if b then begin
|
||||
memberList := TPasClassType(FObject.Parent).Members;
|
||||
@ -126,8 +128,10 @@ begin
|
||||
if TPasElement(memberList[i]).InheritsFrom(TPasProcedure) then begin
|
||||
locProc := TPasProcedure(memberList[i]);
|
||||
if ( locProc <> FObject ) and
|
||||
( AnsiSameText(locProc.Name,FObject.Name) or
|
||||
AnsiSameText(FSymbolTable.GetExternalName(locProc),FSymbolTable.GetExternalName(FObject))
|
||||
( AnsiSameText(locProc.Name,locName) or
|
||||
( ( Self.UpdateType = etUpdate ) and
|
||||
AnsiSameText(FSymbolTable.GetExternalName(locProc),FSymbolTable.GetExternalName(FObject))
|
||||
)
|
||||
)
|
||||
then begin
|
||||
b := False;
|
||||
|
Reference in New Issue
Block a user