Type Library Editor : fix function's return type setting.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@850 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
inoussa
2009-06-16 09:54:57 +00:00
parent 5164d80f26
commit 8ff7c73715
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,5 @@
{ Ceci est un fichier ressource généré automatiquement par Lazarus }
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#13'ActiveControl'#7#7'edtName'#11'BorderStyle'#7#13'bsSizeT' +#5'Width'#3#10#2#13'ActiveControl'#7#7'edtName'#11'BorderStyle'#7#13'bsSizeT'

View File

@ -291,12 +291,17 @@ procedure TfProcEdit.SaveToObject();
end; end;
procedure CheckObjectType(); procedure CheckObjectType();
var
newRetType : TPasType;
begin begin
if FObject.InheritsFrom(TPasFunction) then begin if FObject.InheritsFrom(TPasFunction) then begin
newRetType := edtResultType.Items.Objects[edtResultType.ItemIndex] as TPasType;
if ( FOldReturnType <> nil ) and if ( FOldReturnType <> nil ) and
( FOldReturnType <> TPasFunctionType(FObject.ProcType).ResultEl.ResultType ) ( FOldReturnType <> newRetType )
then begin then begin
FOldReturnType.Release(); FOldReturnType.Release();
TPasFunctionType(FObject.ProcType).ResultEl.ResultType := newRetType;
newRetType.AddRef();
end; end;
end; end;
if edtFunction.Checked and ( not FObject.InheritsFrom(TPasFunction) ) then begin if edtFunction.Checked and ( not FObject.InheritsFrom(TPasFunction) ) then begin