IDE: creating component interfaces for nested/inline components

git-svn-id: trunk@15734 -
This commit is contained in:
mattias 2008-07-10 13:36:50 +00:00
parent ee57894807
commit c6197e81fe
2 changed files with 16 additions and 9 deletions

View File

@ -2407,10 +2407,14 @@ procedure TCustomFormEditor.CreateChildComponentInterfaces(
AComponent: TComponent);
var
i: Integer;
ChildComponent: TComponent;
begin
// create a component interface for each component owned by the new component
for i:=0 to AComponent.ComponentCount-1 do
CreateComponentInterface(AComponent.Components[i],false);
for i:=0 to AComponent.ComponentCount-1 do begin
ChildComponent:=AComponent.Components[i];
CreateComponentInterface(ChildComponent,
csInline in ChildComponent.ComponentState);
end;
end;
function TCustomFormEditor.GetDefaultComponentParent(TypeClass: TComponentClass

View File

@ -1381,9 +1381,7 @@ begin
end else if IsJITMethod(Method) then begin
JITMethod:=TJITMethod(Method.Data);
Result:=JITMethod.TheMethodName;
{$IFDEF EnableTFrame}
DebugLn(['TMainIDE.OnPropHookGetMethodName ',dbgsName(GlobalDesignHook.LookupRoot),' ',dbgsName(JITMethod.TheClass)]);
{$ENDIF}
//DebugLn(['TMainIDE.OnPropHookGetMethodName ',dbgsName(GlobalDesignHook.LookupRoot),' ',dbgsName(JITMethod.TheClass)]);
if (GlobalDesignHook.LookupRoot.ClassType<>JITMethod.TheClass)
or ((GlobalDesignHook.LookupRoot is TComponent)
and (csInline in TComponent(GlobalDesignHook.LookupRoot).ComponentState))
@ -13905,7 +13903,8 @@ end;
function TMainIDE.OnPropHookCreateMethod(const AMethodName: ShortString;
ATypeInfo: PTypeInfo;
APersistent: TPersistent; const APropertyPath: string): TMethod;
var ActiveSrcEdit: TSourceEditor;
var
ActiveSrcEdit: TSourceEditor;
ActiveUnitInfo: TUnitInfo;
r: boolean;
OldChange: Boolean;
@ -13915,10 +13914,13 @@ begin
if not BeginCodeTool(ActiveSrcEdit,ActiveUnitInfo,[ctfSwitchToFormSource])
then exit;
{$IFDEF IDE_DEBUG}
writeln('');
writeln('[TMainIDE.OnPropHookCreateMethod] ************ ',AMethodName);
debugln('');
debugln('[TMainIDE.OnPropHookCreateMethod] ************ ',AMethodName);
DebugLn(['[TMainIDE.OnPropHookCreateMethod] Persistent=',dbgsName(APersistent),' Unit=',GetClassUnitName(APersistent.ClassType),' Path=',APropertyPath]);
{$ENDIF}
DebugLn(['TMainIDE.OnPropHookCreateMethod ',APropertyPath]);
OldChange:=OpenEditorsOnCodeToolChange;
OpenEditorsOnCodeToolChange:=true;
try
@ -13965,7 +13967,8 @@ begin
AClassName:=ActiveUnitInfo.Component.ClassName;
CurMethodName:=AMethodName;
if IsValidIdentPair(AMethodName,AnInheritedClassName,AInheritedMethodName) then begin
if IsValidIdentPair(AMethodName,AnInheritedClassName,AInheritedMethodName)
then begin
ActiveSrcEdit:=nil;
ActiveUnitInfo:=Project1.UnitWithComponentClassName(AnInheritedClassName);
if ActiveUnitInfo=nil then begin