Forum > Beginners

TApplication vs Application

(1/2) > >>

pascal111:
While I was exploring the files of a small program I typed in Lazarus, I explored a file called "project1.lpr" and found this code inside it:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---program project1; {$mode objfpc}{$H+} uses  {$IFDEF UNIX}  cthreads,  {$ENDIF}  {$IFDEF HASAMIGA}  athreads,  {$ENDIF}  Interfaces, // this includes the LCL widgetset  Forms, Unit1  { you can add units after this }; {$R *.res} begin  RequireDerivedFormResource:=True;  Application.Scaled:=True;  Application.Initialize;  Application.CreateForm(TForm1, Form1);  Application.Run;end.  
I noticed that the code used "Application" rather than "TApplication", I think it should use "TApplication", so why this change in the name?

VisualLab:
TApplication is a class. Application is:

- variable of type (class) TApplication,
- is global,
- created in the initialization section of the Forms unit.

MarkMLl:

--- Quote from: pascal111 on July 03, 2022, 06:02:48 pm ---I noticed that the code used "Application" rather than "TApplication", I think it should use "TApplication",

--- End quote ---

Why do you think that? I'm not trying to be hostile or give you the brushoff, I'd just like to work through this methodically.

MarkMLl

pascal111:

--- Quote ---Why do you think that? I'm not trying to be hostile or give you the brushoff, I'd just like to work through this methodically

--- End quote ---

This question appropriately have to be asked for a human? soft human being? why do you think you are talking to a human?  :)

I'm joking with you  :D

Really, I saw "T" letter removed, so I thought that we have maybe two different classes.

pascal111:

--- Quote ---- created in the initialization section of the Forms unit.

--- End quote ---

Do you mean a hidden section? or an internal section in "Forms" unit?

Navigation

[0] Message Index

[#] Next page

Go to full version