You've already forked lazarus-ccr
<ItemFocused> is not reliable, use ItemIdex
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2576 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -8,7 +8,7 @@ object fProcEdit: TfProcEdit
|
||||
ClientHeight = 543
|
||||
ClientWidth = 522
|
||||
Position = poMainFormCenter
|
||||
LCLVersion = '0.9.29'
|
||||
LCLVersion = '1.0.1.4'
|
||||
object PageControl1: TPageControl
|
||||
Left = 0
|
||||
Height = 493
|
||||
@ -20,40 +20,40 @@ object fProcEdit: TfProcEdit
|
||||
TabOrder = 0
|
||||
object TabSheet1: TTabSheet
|
||||
Caption = '&Operation'
|
||||
ClientHeight = 467
|
||||
ClientWidth = 514
|
||||
ClientHeight = 458
|
||||
ClientWidth = 516
|
||||
object Label1: TLabel
|
||||
Left = 12
|
||||
Height = 14
|
||||
Height = 18
|
||||
Top = 26
|
||||
Width = 28
|
||||
Width = 40
|
||||
Caption = 'Name'
|
||||
ParentColor = False
|
||||
end
|
||||
object edtName: TEdit
|
||||
Left = 112
|
||||
Height = 21
|
||||
Height = 27
|
||||
Top = 26
|
||||
Width = 388
|
||||
Width = 390
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
TabOrder = 0
|
||||
Text = 'edtName'
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 11
|
||||
Height = 304
|
||||
Height = 295
|
||||
Top = 114
|
||||
Width = 489
|
||||
Width = 491
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
Caption = ' Parametters '
|
||||
ClientHeight = 286
|
||||
ClientWidth = 485
|
||||
ClientHeight = 276
|
||||
ClientWidth = 487
|
||||
TabOrder = 3
|
||||
object edtParams: TListView
|
||||
Left = 0
|
||||
Height = 286
|
||||
Height = 276
|
||||
Top = 0
|
||||
Width = 485
|
||||
Width = 487
|
||||
Align = alClient
|
||||
Columns = <
|
||||
item
|
||||
@ -70,7 +70,6 @@ object fProcEdit: TfProcEdit
|
||||
end
|
||||
item
|
||||
end>
|
||||
ItemIndex = -1
|
||||
RowSelect = True
|
||||
TabOrder = 0
|
||||
ViewStyle = vsReport
|
||||
@ -78,9 +77,9 @@ object fProcEdit: TfProcEdit
|
||||
end
|
||||
object edtFunction: TCheckBox
|
||||
Left = 12
|
||||
Height = 17
|
||||
Height = 22
|
||||
Top = 74
|
||||
Width = 97
|
||||
Width = 127
|
||||
Caption = 'Function returns'
|
||||
OnClick = edtFunctionClick
|
||||
OnEditingDone = edtFunctionEditingDone
|
||||
@ -88,18 +87,18 @@ object fProcEdit: TfProcEdit
|
||||
end
|
||||
object edtResultType: TComboBox
|
||||
Left = 112
|
||||
Height = 21
|
||||
Height = 31
|
||||
Top = 74
|
||||
Width = 388
|
||||
Width = 390
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
ItemHeight = 13
|
||||
ItemHeight = 0
|
||||
Style = csDropDownList
|
||||
TabOrder = 2
|
||||
end
|
||||
object Button3: TButton
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 429
|
||||
Top = 420
|
||||
Width = 108
|
||||
Action = actNewArg
|
||||
Anchors = [akLeft, akBottom]
|
||||
@ -109,7 +108,7 @@ object fProcEdit: TfProcEdit
|
||||
object Button4: TButton
|
||||
Left = 132
|
||||
Height = 25
|
||||
Top = 429
|
||||
Top = 420
|
||||
Width = 108
|
||||
Action = actUpdateArgument
|
||||
Anchors = [akLeft, akBottom]
|
||||
@ -119,7 +118,7 @@ object fProcEdit: TfProcEdit
|
||||
object Button5: TButton
|
||||
Left = 248
|
||||
Height = 25
|
||||
Top = 429
|
||||
Top = 420
|
||||
Width = 108
|
||||
Action = actDeleteArgument
|
||||
Anchors = [akLeft, akBottom]
|
||||
|
@ -4,50 +4,50 @@ LazarusResources.Add('TfProcEdit','FORMDATA',[
|
||||
'TPF0'#10'TfProcEdit'#9'fProcEdit'#4'Left'#3'I'#1#6'Height'#3#31#2#3'Top'#3
|
||||
+#143#0#5'Width'#3#10#2#11'BorderStyle'#7#13'bsSizeToolWin'#7'Caption'#6#9'fP'
|
||||
+'rocEdit'#12'ClientHeight'#3#31#2#11'ClientWidth'#3#10#2#8'Position'#7#16'po'
|
||||
+'MainFormCenter'#10'LCLVersion'#6#6'0.9.29'#0#12'TPageControl'#12'PageContro'
|
||||
+'l1'#4'Left'#2#0#6'Height'#3#237#1#3'Top'#2#0#5'Width'#3#10#2#10'ActivePage'
|
||||
+'MainFormCenter'#10'LCLVersion'#6#7'1.0.1.4'#0#12'TPageControl'#12'PageContr'
|
||||
+'ol1'#4'Left'#2#0#6'Height'#3#237#1#3'Top'#2#0#5'Width'#3#10#2#10'ActivePage'
|
||||
+#7#9'TabSheet1'#5'Align'#7#8'alClient'#8'TabIndex'#2#0#8'TabOrder'#2#0#0#9'T'
|
||||
+'TabSheet'#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'T'
|
||||
+'op'#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#21#3'Top'#2#26#5'Width'#3#132#1#7'Anchors'
|
||||
+'TabSheet'#9'TabSheet1'#7'Caption'#6#10'&Operation'#12'ClientHeight'#3#202#1
|
||||
+#11'ClientWidth'#3#4#2#0#6'TLabel'#6'Label1'#4'Left'#2#12#6'Height'#2#18#3'T'
|
||||
+'op'#2#26#5'Width'#2'('#7'Caption'#6#4'Name'#11'ParentColor'#8#0#0#5'TEdit'#7
|
||||
+'edtName'#4'Left'#2'p'#6'Height'#2#27#3'Top'#2#26#5'Width'#3#134#1#7'Anchors'
|
||||
+#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'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'Tab'
|
||||
+'Order'#2#3#0#9'TListView'#9'edtParams'#4'Left'#2#0#6'Height'#3#30#1#3'Top'#2
|
||||
+#0#5'Width'#3#229#1#5'Align'#7#8'alClient'#7'Columns'#14#1#7'Caption'#6#4'Na'
|
||||
+'me'#5'Width'#3#180#0#0#1#7'Caption'#6#4'Type'#5'Width'#3#190#0#0#1#7'Captio'
|
||||
+'n'#6#8'Modifier'#5'Width'#2'<'#0#1#0#0#9'ItemIndex'#2#255#9'RowSelect'#9#8
|
||||
+'TabOrder'#2#0#9'ViewStyle'#7#8'vsReport'#0#0#0#9'TCheckBox'#11'edtFunction'
|
||||
+#4'Left'#2#12#6'Height'#2#17#3'Top'#2'J'#5'Width'#2'a'#7'Caption'#6#16'Funct'
|
||||
+'ion returns'#7'OnClick'#7#16'edtFunctionClick'#13'OnEditingDone'#7#22'edtFu'
|
||||
+'nctionEditingDone'#8'TabOrder'#2#1#0#0#9'TComboBox'#13'edtResultType'#4'Lef'
|
||||
+'t'#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#10'ItemHeight'#2#13#5'Style'#7#14'csDropDownList'#8'Ta'
|
||||
+'bOrder'#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'akLeft'#8'akBo'
|
||||
+'ttom'#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'Acti'
|
||||
+'on'#7#17'actUpdateArgument'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#25'Border'
|
||||
+'Spacing.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'actDeleteA'
|
||||
+#9'TGroupBox'#9'GroupBox1'#4'Left'#2#11#6'Height'#3''''#1#3'Top'#2'r'#5'Widt'
|
||||
+'h'#3#235#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#7'Capt'
|
||||
+'ion'#6#15' Parametters '#12'ClientHeight'#3#20#1#11'ClientWidth'#3#231#1#8
|
||||
+'TabOrder'#2#3#0#9'TListView'#9'edtParams'#4'Left'#2#0#6'Height'#3#20#1#3'To'
|
||||
+'p'#2#0#5'Width'#3#231#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'Ca'
|
||||
+'ption'#6#8'Modifier'#5'Width'#2'<'#0#1#0#0#9'RowSelect'#9#8'TabOrder'#2#0#9
|
||||
+'ViewStyle'#7#8'vsReport'#0#0#0#9'TCheckBox'#11'edtFunction'#4'Left'#2#12#6
|
||||
+'Height'#2#22#3'Top'#2'J'#5'Width'#2#127#7'Caption'#6#16'Function returns'#7
|
||||
+'OnClick'#7#16'edtFunctionClick'#13'OnEditingDone'#7#22'edtFunctionEditingDo'
|
||||
+'ne'#8'TabOrder'#2#1#0#0#9'TComboBox'#13'edtResultType'#4'Left'#2'p'#6'Heigh'
|
||||
+'t'#2#31#3'Top'#2'J'#5'Width'#3#134#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akR'
|
||||
+'ight'#0#10'ItemHeight'#2#0#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#164#1#5'Width'#2
|
||||
+'l'#6'Action'#7#9'actNewArg'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#25'Border'
|
||||
+'Spacing.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#164#1#5'Width'#2'l'#6'Action'#7#17'actUpdateA'
|
||||
+'rgument'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'
|
||||
+#2#4#8'TabOrder'#2#6#0#0#0#0#6'TPanel'#6'Panel1'#4'Left'#2#0#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'#9'OnExecute'#7#12'actOkExecute'#8'OnUpdate'#7#11
|
||||
+'actOkUpdate'#0#0#7'TAction'#9'actNewArg'#7'Caption'#6#12'New Argument'#9'On'
|
||||
+'Execute'#7#16'actNewArgExecute'#0#0#7'TAction'#17'actUpdateArgument'#7'Capt'
|
||||
+'ion'#6#13'Edit Argument'#9'OnExecute'#7#24'actUpdateArgumentExecute'#8'OnUp'
|
||||
+'date'#7#23'actUpdateArgumentUpdate'#0#0#7'TAction'#17'actDeleteArgument'#7
|
||||
+'Caption'#6#15'Delete Argument'#9'OnExecute'#7#24'actDeleteArgumentExecute'#8
|
||||
+'OnUpdate'#7#23'actUpdateArgumentUpdate'#0#0#0#10'TPopupMenu'#10'PopupMenu1'
|
||||
+#4'left'#2'S'#3'top'#3#217#0#0#0#0
|
||||
+#2#4#8'TabOrder'#2#5#0#0#7'TButton'#7'Button5'#4'Left'#3#248#0#6'Height'#2#25
|
||||
+#3'Top'#3#164#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'Panel1'#4'Left'#2#0#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'TabOrder'#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.InnerBorder'#2#4#6'Cancel'#9#7'Ca'
|
||||
+'ption'#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'O'
|
||||
+'K'#9'OnExecute'#7#12'actOkExecute'#8'OnUpdate'#7#11'actOkUpdate'#0#0#7'TAct'
|
||||
+'ion'#9'actNewArg'#7'Caption'#6#12'New Argument'#9'OnExecute'#7#16'actNewArg'
|
||||
+'Execute'#0#0#7'TAction'#17'actUpdateArgument'#7'Caption'#6#13'Edit Argument'
|
||||
+#9'OnExecute'#7#24'actUpdateArgumentExecute'#8'OnUpdate'#7#23'actUpdateArgum'
|
||||
+'entUpdate'#0#0#7'TAction'#17'actDeleteArgument'#7'Caption'#6#15'Delete Argu'
|
||||
+'ment'#9'OnExecute'#7#24'actDeleteArgumentExecute'#8'OnUpdate'#7#23'actUpdat'
|
||||
+'eArgumentUpdate'#0#0#0#10'TPopupMenu'#10'PopupMenu1'#4'left'#2'S'#3'top'#3
|
||||
+#217#0#0#0#0
|
||||
]);
|
||||
|
@ -105,10 +105,10 @@ procedure TfProcEdit.actDeleteArgumentExecute(Sender: TObject);
|
||||
var
|
||||
prop : TPasArgument;
|
||||
begin
|
||||
prop := TPasArgument(edtParams.ItemFocused.Data);
|
||||
prop := TPasArgument(edtParams.Items[edtParams.ItemIndex].Data);
|
||||
FObject.ProcType.Args.Extract(prop);
|
||||
prop.Release();
|
||||
edtParams.ItemFocused.Free();
|
||||
edtParams.Items[edtParams.ItemIndex].Free();
|
||||
end;
|
||||
|
||||
procedure TfProcEdit.actOkUpdate(Sender: TObject);
|
||||
@ -148,7 +148,7 @@ var
|
||||
prp : TPasArgument;
|
||||
itm : TListItem;
|
||||
begin
|
||||
itm := edtParams.ItemFocused;
|
||||
itm := edtParams.Items[edtParams.ItemIndex];
|
||||
if Assigned(itm) then begin
|
||||
prp := TPasArgument(itm.Data);
|
||||
if edit_helper.UpdateObject(TPasElement(prp),FSymbolTable) then begin
|
||||
@ -160,7 +160,7 @@ end;
|
||||
|
||||
procedure TfProcEdit.actUpdateArgumentUpdate(Sender: TObject);
|
||||
begin
|
||||
TAction(Sender).Enabled := Assigned(edtParams.ItemFocused);
|
||||
TAction(Sender).Enabled := (edtParams.ItemIndex >= 0);
|
||||
end;
|
||||
|
||||
procedure TfProcEdit.edtFunctionClick(Sender: TObject);
|
||||
@ -244,7 +244,7 @@ procedure TfProcEdit.SaveToObject();
|
||||
newArg.Access := arg.Access;
|
||||
newArg.ArgType := arg.ArgType;
|
||||
newArg.ArgType.AddRef();
|
||||
newArg.Value := arg.Value;
|
||||
//newArg.Value := arg.Value;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user