Jump to content

Mircea Cornestian

uniGUI Subscriber
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Mircea Cornestian

  1. RAD Studio 11.3 Version 28.0.48361.3236

    uniGUI Trial, uniGUI Complete Trial 

    uni-1.90.0.1568

    ext 7.5.1

    jq 3.6.4

    win32 target platform

    I want to test: to make a component

    when i try to use TreeIntf for method RegisterSprigType

    package myWebComponents;
    
    {$R *.res}
    {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
    {$ALIGN 8}
    {$ASSERTIONS ON}
    {$BOOLEVAL OFF}
    {$DEBUGINFO OFF}
    {$EXTENDEDSYNTAX ON}
    {$IMPORTEDDATA ON}
    {$IOCHECKS ON}
    {$LOCALSYMBOLS ON}
    {$LONGSTRINGS ON}
    {$OPENSTRINGS ON}
    {$OPTIMIZATION OFF}
    {$OVERFLOWCHECKS ON}
    {$RANGECHECKS ON}
    {$REFERENCEINFO ON}
    {$SAFEDIVIDE OFF}
    {$STACKFRAMES ON}
    {$TYPEDADDRESS OFF}
    {$VARSTRINGCHECKS ON}
    {$WRITEABLECONST OFF}
    {$MINENUMSIZE 1}
    {$IMAGEBASE $400000}
    {$DEFINE DEBUG}
    {$ENDIF IMPLICITBUILDING}
    {$IMPLICITBUILD ON}
    
    requires
      rtl,
      vcl,
      uniGUI28,
      dsnap,
      dbrtl,
      uniGUI28Core,
      uniTools28,
      uIndy28,
      soaprtl,
      xmlrtl,
      inet,
      vclimg,
      vcldb,
      vclwinx,
      bindengine;
    
    contains
      myWebMenuButton in 'myWebMenuButton\myWebMenuButton.pas';
    
    end.
    unit myWebMenuButton;
    
    interface
    
    uses
      System.SysUtils, System.Classes, Vcl.Controls, Vcl.Forms, uniGUIBaseClasses,
      uniGUIClasses, uniButton, uniBitBtn, uniMenuButton, uniGUIFrame,
      uniGUIDialogs;
    
      TreeIntf;
    
    type
      TmyWebMenuButton = class(TUniMenuButton)
      private
        { Private declarations }
      protected
        { Protected declarations }
    
      public
        { Public declarations }
        constructor Create(AOwner: TComponent); override;
        destructor Destroy; override;
        procedure doonClick(Sender: TObject);
    
      published
        { Published declarations }
      end;
    
    procedure Register;
    
    implementation
    
    constructor TmyWebMenuButton.Create(AOwner: TComponent);
    begin
      inherited Create(AOwner);
      //
      onClick := doonClick;
    end;
    
    destructor TmyWebMenuButton.Destroy;
    begin
      //
      inherited Destroy;
    end;
    
    procedure TmyWebMenuButton.doonClick(Sender: TObject);
    begin
    //Showmessage('test: Clicked');
    (Sender as TUniMenuButton).DropdownMenu.PopupBy((Sender as TUniMenuButton))
    
    end;
    
    procedure Register;
    begin
      RegisterComponents('myWebESP', [TmyWebMenuButton]);
      RegisterSprigType(TmyWebMenuButton, TComponentSprig);
    
    end;
    
    end.

    but I noticed that the component also works without RegisterSprigType()

×
×
  • Create New...