|
이 답변이 맞을지 모르겠네요.
Component Class안에서 타 Component class를 링크 시켜 사용할 경우에는
Notification함수에서 Operation의 Remove에 대한 처리를 해주셔야 합니다.
void __fastcall [클래스명]::Notification(Classes::TComponent* AComponent, Classes::TOperation AOperation)
{
[참조 클래스명]::Notification(AComponent, AOperation);
if(AOperation == opRemove)
{
if(AComponent == FLabel_1)
{
FLabel_1 = NULL;
// 그외 처리...
}
}
}
[참고] ImageList같은 컴포넌트 링크시는
ImageList가 설정될때
UnRegisterChanges, RegisterChanges, FreeNotification함수를 사용하셔야 합니다.
상록수.네오 님이 쓰신 글 :
: 답변은 감사합니다.
: Component를 설치하는것에 대한 문제로 생각하셨나봅니다.
:
: 제 문제는 새로운 Component를 개발하는도중 발생한 것으로
: 제가 만드는 Component에 기존 Component를 연동하여 사용하는것에 대한것입니다.
:
: 기존 Component중 Builder의 기본 Component나 제가 개발한 Component를 같은 Package로 묶은 경우
: #include "Logger.h" // 제가 작성한 Component header
: #include <stdctrls.hpp> // TLabel이 속해있는 VCL Header
: 등으로 including 한 후
:
: private:
: stdctrls::TLabel * FLabel_1;
: TNeoLogger * FNeoLogger_1;
: public:
: __published
: __Property stdctrls::TLabel * Label_1 = { read = FLabel_1, write = FLabel_1 };
: __Property TNeoLogger * NeoLofer_1 = { read = FNeoLogger_1, write = FNeoLogger_1 };
:
: 와 같이 Setting하면 wprk aksems Component와 기존 Component가 연동이 됩니다.
: 그러나, 다른 user가 배포한 component의 경우 위와 같이 할 경우 compiler가 user made component와
: 제 component package사이에 충돌을 일으켜 제 package 전체를 거부하게 됩니다.
:
: 이 문제에 대한 해답을 구합니다. 이해가 되셨기를....
: 유영인 Cuperido 님이 쓰신 글 :
: : 질문이 확실이 이해가 가지 않지만,
: :
: : .BPK 등의 패키지 형태는, 직접 로드 하시거나 더블클릭으로 로딩하셔서
: : Install 버튼을 누르시면 설치가 되고,
: :
: : 일반 컴포넌트의 경우에는 Compoent -> Install Component 메뉴에서 Unit File Name 항목에서
: : 해당 유닛을 설정한 다음 Install 을 누르면 설치됩니다.
: :
: :
: : cuperido
: :
: :
|