Linuxuser1234 1 Posted November 25, 2022 (edited) I have a unit called BOLT and i would like to use the viewport component from that unit to my GISEngine unit how can i do this? unit GISEngine; interface uses System.SysUtils, System.Classes, BOLT, FMX.Viewport3D; implementation procedure TForm1.Viewport3D1(Sender: TObject); begin end; end. Error GISEngine does not contain a member named Viewport3D1 Edited November 25, 2022 by Linuxuser1234 Share this post Link to post
programmerdelphi2k 237 Posted November 26, 2022 (edited) GISEngine doest not have "TFORM1" class/instance object, then, you can not reference it like this! you can create a generic "procedure ... of object" and use it for two, or, for example: ------ form1 TForm1 = class(TForm) Viewport3D1: TViewport3D; procedure Viewport3D1Click(Sender: TObject); --------- form2 type TForm2 = class(TForm) Viewport3D1: TViewport3D; procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form2: TForm2; implementation {$R *.fmx} uses Unit1; procedure TForm2.FormCreate(Sender: TObject); begin Viewport3D1.OnClick := Form1.Viewport3D1Click; end; Edited November 26, 2022 by programmerdelphi2k Share this post Link to post
Linuxuser1234 1 Posted November 26, 2022 (edited) @programmerdelphi2k i keep getting Type BOLT (which is my unit1 or TForm1) is not yet completely defined and i have been unable to resolve the error and yes i have looked at the docwiki unit GISEngine; //This unit Displays Shapefiles onto a 3D Globe interface uses System.SysUtils, System.Classes, BOLT, FMX.Viewport3D; type BOLT = class(BOLT) Viewport3D1:TViewport3D; procedure VP3DGISEngine(Sender: TObject); private public end; var Form1 : TForm1; implementation end. Edited November 26, 2022 by Linuxuser1234 Share this post Link to post
programmerdelphi2k 237 Posted November 26, 2022 4 minutes ago, Linuxuser1234 said: i keep getting Type BOLT zip and upload yours "FORMS", let's try some... Share this post Link to post
Linuxuser1234 1 Posted November 26, 2022 @programmerdelphi2k can i pm you the file Share this post Link to post
programmerdelphi2k 237 Posted November 26, 2022 no EXE, DCU, etc.. no binary, just code ok Share this post Link to post