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:
inoussa
2009-04-17 20:00:07 +00:00
parent 2da70cacf0
commit 6655cc5b94
4 changed files with 60 additions and 59 deletions

View File

@ -118,6 +118,7 @@
<Filename Value="uprocedit.pas"/> <Filename Value="uprocedit.pas"/>
<ComponentName Value="fProcEdit"/> <ComponentName Value="fProcEdit"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="uprocedit"/> <UnitName Value="uprocedit"/>
</Unit13> </Unit13>
<Unit14> <Unit14>

View File

@ -3,14 +3,13 @@ object fProcEdit: TfProcEdit
Height = 543 Height = 543
Top = 118 Top = 118
Width = 522 Width = 522
HorzScrollBar.Page = 521
VertScrollBar.Page = 542
ActiveControl = edtName ActiveControl = edtName
BorderStyle = bsSizeToolWin BorderStyle = bsSizeToolWin
Caption = 'fProcEdit' Caption = 'fProcEdit'
ClientHeight = 543 ClientHeight = 543
ClientWidth = 522 ClientWidth = 522
Position = poMainFormCenter Position = poMainFormCenter
LCLVersion = '0.9.26.2'
object PageControl1: TPageControl object PageControl1: TPageControl
Height = 493 Height = 493
Width = 522 Width = 522
@ -75,9 +74,9 @@ object fProcEdit: TfProcEdit
end end
object edtFunction: TCheckBox object edtFunction: TCheckBox
Left = 12 Left = 12
Height = 13 Height = 17
Top = 74 Top = 74
Width = 96 Width = 94
Caption = 'Function returns' Caption = 'Function returns'
OnClick = edtFunctionClick OnClick = edtFunctionClick
OnEditingDone = edtFunctionEditingDone OnEditingDone = edtFunctionEditingDone
@ -89,9 +88,7 @@ object fProcEdit: TfProcEdit
Top = 74 Top = 74
Width = 388 Width = 388
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
ItemHeight = 13 ItemHeight = 13
MaxLength = 0
Style = csDropDownList Style = csDropDownList
TabOrder = 2 TabOrder = 2
end end

View File

@ -2,54 +2,53 @@
LazarusResources.Add('TfProcEdit','FORMDATA',[ LazarusResources.Add('TfProcEdit','FORMDATA',[
'TPF0'#10'TfProcEdit'#9'fProcEdit'#4'Left'#3'"'#1#6'Height'#3#31#2#3'Top'#2'v' '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 +#5'Width'#3#10#2#13'ActiveControl'#7#7'edtName'#11'BorderStyle'#7#13'bsSizeT'
+#13'ActiveControl'#7#7'edtName'#11'BorderStyle'#7#13'bsSizeToolWin'#7'Captio' +'oolWin'#7'Caption'#6#9'fProcEdit'#12'ClientHeight'#3#31#2#11'ClientWidth'#3
+'n'#6#9'fProcEdit'#12'ClientHeight'#3#31#2#11'ClientWidth'#3#10#2#8'Position' +#10#2#8'Position'#7#16'poMainFormCenter'#10'LCLVersion'#6#8'0.9.26.2'#0#12'T'
+#7#16'poMainFormCenter'#0#12'TPageControl'#12'PageControl1'#6'Height'#3#237#1 +'PageControl'#12'PageControl1'#6'Height'#3#237#1#5'Width'#3#10#2#10'ActivePa'
+#5'Width'#3#10#2#10'ActivePage'#7#9'TabSheet1'#5'Align'#7#8'alClient'#8'TabI' +'ge'#7#9'TabSheet1'#5'Align'#7#8'alClient'#8'TabIndex'#2#0#8'TabOrder'#2#0#0
+'ndex'#2#0#8'TabOrder'#2#0#0#9'TTabSheet'#9'TabSheet1'#7'Caption'#6#10'&Oper' +#9'TTabSheet'#9'TabSheet1'#7'Caption'#6#10'&Operation'#12'ClientHeight'#3#211
+'ation'#12'ClientHeight'#3#211#1#11'ClientWidth'#3#2#2#0#6'TLabel'#6'Label1' +#1#11'ClientWidth'#3#2#2#0#6'TLabel'#6'Label1'#4'Left'#2#12#6'Height'#2#14#3
+#4'Left'#2#12#6'Height'#2#14#3'Top'#2#26#5'Width'#2#28#7'Caption'#6#4'Name' +'Top'#2#26#5'Width'#2#28#7'Caption'#6#4'Name'#11'ParentColor'#8#0#0#5'TEdit'
+#11'ParentColor'#8#0#0#5'TEdit'#7'edtName'#4'Left'#2'p'#6'Height'#2#23#3'Top' +#7'edtName'#4'Left'#2'p'#6'Height'#2#23#3'Top'#2#26#5'Width'#3#132#1#7'Ancho'
+#2#26#5'Width'#3#132#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOr' +'rs'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#0#4'Text'#6#7'edtName'
+'der'#2#0#4'Text'#6#7'edtName'#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#2#11#6 +#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#2#11#6'Height'#3'0'#1#3'Top'#2'r'#5'W'
+'Height'#3'0'#1#3'Top'#2'r'#5'Width'#3#233#1#7'Anchors'#11#5'akTop'#6'akLeft' +'idth'#3#233#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#7'C'
+#7'akRight'#8'akBottom'#0#7'Caption'#6#15' Parametters '#12'ClientHeight'#3 +'aption'#6#15' Parametters '#12'ClientHeight'#3#30#1#11'ClientWidth'#3#229
+#30#1#11'ClientWidth'#3#229#1#8'TabOrder'#2#3#0#9'TListView'#9'edtParams'#6 +#1#8'TabOrder'#2#3#0#9'TListView'#9'edtParams'#6'Height'#3#30#1#5'Width'#3
+'Height'#3#30#1#5'Width'#3#229#1#5'Align'#7#8'alClient'#7'Columns'#14#1#7'Ca' +#229#1#5'Align'#7#8'alClient'#7'Columns'#14#1#7'Caption'#6#4'Name'#5'Width'#3
+'ption'#6#4'Name'#5'Width'#3#180#0#0#1#7'Caption'#6#4'Type'#5'Width'#3#190#0 +#180#0#0#1#7'Caption'#6#4'Type'#5'Width'#3#190#0#0#1#7'Caption'#6#8'Modifier'
+#0#1#7'Caption'#6#8'Modifier'#5'Width'#2'<'#0#1#0#0#9'RowSelect'#9#8'TabOrde' +#5'Width'#2'<'#0#1#0#0#9'RowSelect'#9#8'TabOrder'#2#0#9'ViewStyle'#7#8'vsRep'
+'r'#2#0#9'ViewStyle'#7#8'vsReport'#0#0#0#9'TCheckBox'#11'edtFunction'#4'Left' +'ort'#0#0#0#9'TCheckBox'#11'edtFunction'#4'Left'#2#12#6'Height'#2#17#3'Top'#2
+#2#12#6'Height'#2#13#3'Top'#2'J'#5'Width'#2'`'#7'Caption'#6#16'Function retu' +'J'#5'Width'#2'^'#7'Caption'#6#16'Function returns'#7'OnClick'#7#16'edtFunct'
+'rns'#7'OnClick'#7#16'edtFunctionClick'#13'OnEditingDone'#7#22'edtFunctionEd' +'ionClick'#13'OnEditingDone'#7#22'edtFunctionEditingDone'#8'TabOrder'#2#1#0#0
+'itingDone'#8'TabOrder'#2#1#0#0#9'TComboBox'#13'edtResultType'#4'Left'#2'p'#6 +#9'TComboBox'#13'edtResultType'#4'Left'#2'p'#6'Height'#2#21#3'Top'#2'J'#5'Wi'
+'Height'#2#21#3'Top'#2'J'#5'Width'#3#132#1#7'Anchors'#11#5'akTop'#6'akLeft'#7 +'dth'#3#132#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#10'ItemHeight'#2
+'akRight'#0#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSearc' +#13#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#2#0#0#7'TButton'#7'Button3'#4
+'hAscending'#0#10'ItemHeight'#2#13#9'MaxLength'#2#0#5'Style'#7#14'csDropDown' +'Left'#2#12#6'Height'#2#25#3'Top'#3#173#1#5'Width'#2'l'#6'Action'#7#9'actNew'
+'List'#8'TabOrder'#2#2#0#0#7'TButton'#7'Button3'#4'Left'#2#12#6'Height'#2#25 +'Arg'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4
+#3'Top'#3#173#1#5'Width'#2'l'#6'Action'#7#9'actNewArg'#7'Anchors'#11#6'akLef' +#8'TabOrder'#2#4#0#0#7'TButton'#7'Button4'#4'Left'#3#132#0#6'Height'#2#25#3
+'t'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#4#0#0#7'TB' +'Top'#3#173#1#5'Width'#2'l'#6'Action'#7#17'actUpdateArgument'#7'Anchors'#11#6
+'utton'#7'Button4'#4'Left'#3#132#0#6'Height'#2#25#3'Top'#3#173#1#5'Width'#2 +'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#5#0#0
+'l'#6'Action'#7#17'actUpdateArgument'#7'Anchors'#11#6'akLeft'#8'akBottom'#0 +#7'TButton'#7'Button5'#4'Left'#3#248#0#6'Height'#2#25#3'Top'#3#173#1#5'Width'
+#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#5#0#0#7'TButton'#7'Button5' +#2'l'#6'Action'#7#17'actDeleteArgument'#7'Anchors'#11#6'akLeft'#8'akBottom'#0
+#4'Left'#3#248#0#6'Height'#2#25#3'Top'#3#173#1#5'Width'#2'l'#6'Action'#7#17 +#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#6#0#0#0#0#6'TPanel'#6'Panel'
+'actDeleteArgument'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#25'BorderSpacing.I' +'1'#6'Height'#2'2'#3'Top'#3#237#1#5'Width'#3#10#2#5'Align'#7#8'alBottom'#12
+'nnerBorder'#2#4#8'TabOrder'#2#6#0#0#0#0#6'TPanel'#6'Panel1'#6'Height'#2'2'#3 +'ClientHeight'#2'2'#11'ClientWidth'#3#10#2#8'TabOrder'#2#1#0#7'TButton'#7'Bu'
+'Top'#3#237#1#5'Width'#3#10#2#5'Align'#7#8'alBottom'#12'ClientHeight'#2'2'#11 +'tton1'#4'Left'#3'X'#1#6'Height'#2#25#3'Top'#2#11#5'Width'#2'K'#6'Action'#7#5
+'ClientWidth'#3#10#2#8'TabOrder'#2#1#0#7'TButton'#7'Button1'#4'Left'#3'X'#1#6 +'actOk'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#4
+'Height'#2#25#3'Top'#2#11#5'Width'#2'K'#6'Action'#7#5'actOk'#7'Anchors'#11#5 +#7'Default'#9#8'TabOrder'#2#0#0#0#7'TButton'#7'Button2'#4'Left'#3#176#1#6'He'
+'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#4#7'Default'#9#8'TabOrd' +'ight'#2#25#3'Top'#2#11#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#25
+'er'#2#0#0#0#7'TButton'#7'Button2'#4'Left'#3#176#1#6'Height'#2#25#3'Top'#2#11 +'BorderSpacing.InnerBorder'#2#4#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalR'
+#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBor' +'esult'#2#2#8'TabOrder'#2#1#0#0#0#11'TActionList'#2'AL'#4'left'#3#198#0#3'to'
+'der'#2#4#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder' +'p'#3#241#0#0#7'TAction'#5'actOk'#7'Caption'#6#2'OK'#18'DisableIfNoHandler'#9
+#2#1#0#0#0#11'TActionList'#2'AL'#4'left'#3#198#0#3'top'#3#241#0#0#7'TAction' +#9'OnExecute'#7#12'actOkExecute'#8'OnUpdate'#7#11'actOkUpdate'#0#0#7'TAction'
+#5'actOk'#7'Caption'#6#2'OK'#18'DisableIfNoHandler'#9#9'OnExecute'#7#12'actO' +#9'actNewArg'#7'Caption'#6#12'New Argument'#18'DisableIfNoHandler'#9#9'OnExe'
+'kExecute'#8'OnUpdate'#7#11'actOkUpdate'#0#0#7'TAction'#9'actNewArg'#7'Capti' +'cute'#7#16'actNewArgExecute'#0#0#7'TAction'#17'actUpdateArgument'#7'Caption'
+'on'#6#12'New Argument'#18'DisableIfNoHandler'#9#9'OnExecute'#7#16'actNewArg' +#6#13'Edit Argument'#18'DisableIfNoHandler'#9#9'OnExecute'#7#24'actUpdateArg'
+'Execute'#0#0#7'TAction'#17'actUpdateArgument'#7'Caption'#6#13'Edit Argument' +'umentExecute'#8'OnUpdate'#7#23'actUpdateArgumentUpdate'#0#0#7'TAction'#17'a'
+#18'DisableIfNoHandler'#9#9'OnExecute'#7#24'actUpdateArgumentExecute'#8'OnUp' +'ctDeleteArgument'#7'Caption'#6#15'Delete Argument'#18'DisableIfNoHandler'#9
+'date'#7#23'actUpdateArgumentUpdate'#0#0#7'TAction'#17'actDeleteArgument'#7 +#9'OnExecute'#7#24'actDeleteArgumentExecute'#8'OnUpdate'#7#23'actUpdateArgum'
+'Caption'#6#15'Delete Argument'#18'DisableIfNoHandler'#9#9'OnExecute'#7#24'a' +'entUpdate'#0#0#0#10'TPopupMenu'#10'PopupMenu1'#4'left'#2'S'#3'top'#3#217#0#0
+'ctDeleteArgumentExecute'#8'OnUpdate'#7#23'actUpdateArgumentUpdate'#0#0#0#10 +#0#0
+'TPopupMenu'#10'PopupMenu1'#4'left'#2'S'#3'top'#3#217#0#0#0#0
]); ]);

View File

@ -117,8 +117,10 @@ var
i : Integer; i : Integer;
locProc : TPasProcedure; locProc : TPasProcedure;
memberList : TList; memberList : TList;
locName : string;
begin begin
b := ( not IsStrEmpty(edtName.Text) ) and locName := edtName.Text;
b := ( not IsStrEmpty(locName) ) and
( ( not edtFunction.Checked ) or ( edtResultType.ItemIndex > -1 ) ); ( ( not edtFunction.Checked ) or ( edtResultType.ItemIndex > -1 ) );
if b then begin if b then begin
memberList := TPasClassType(FObject.Parent).Members; memberList := TPasClassType(FObject.Parent).Members;
@ -126,9 +128,11 @@ begin
if TPasElement(memberList[i]).InheritsFrom(TPasProcedure) then begin if TPasElement(memberList[i]).InheritsFrom(TPasProcedure) then begin
locProc := TPasProcedure(memberList[i]); locProc := TPasProcedure(memberList[i]);
if ( locProc <> FObject ) and if ( locProc <> FObject ) and
( AnsiSameText(locProc.Name,FObject.Name) or ( AnsiSameText(locProc.Name,locName) or
( ( Self.UpdateType = etUpdate ) and
AnsiSameText(FSymbolTable.GetExternalName(locProc),FSymbolTable.GetExternalName(FObject)) AnsiSameText(FSymbolTable.GetExternalName(locProc),FSymbolTable.GetExternalName(FObject))
) )
)
then begin then begin
b := False; b := False;
Break; Break;