Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using packages #53

Open
foxdayk opened this issue Dec 19, 2019 · 1 comment
Open

Using packages #53

foxdayk opened this issue Dec 19, 2019 · 1 comment

Comments

@foxdayk
Copy link

foxdayk commented Dec 19, 2019

Good day! Could you give some advice on how to use FrameStand in case of storing TFrame heirs in bpl packages?

@foxdayk
Copy link
Author

foxdayk commented Dec 19, 2019

Well, I implement class:


  TPackageFrameInfo = class(TSubjectInfo)
  private
    FFrameIsOwned: Boolean;
    FFrame: TFrame;
  protected
    function GetSubjectIsOwned: Boolean; override;
    procedure SetSubjectIsOwned(const Value: Boolean); override;
    function GetSubject: TSubject; override;
    procedure SetSubject(const Value: TSubject); override;
  end;

methods are equal to TFrameInfo
and in button on click procedure implement following code:

var
  LClass: TClass;
  frame: TFrame;
  subj: TSubjectInfo;
begin
    LClass = GetClassFromPackage;
    frame := TFrameClass(LClass).Create(parentComponent);
    subj := TPackageFrameInfo.Create(FrameStand1, frame, parentComponent, 'inframesLX');
    subj.SubjectShow();


and its work. But may be that is not a best choice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant