Lajos Juhász
Members-
Content Count
987 -
Joined
-
Last visited
-
Days Won
12
Everything posted by Lajos Juhász
-
Show executable size after successful build?
Lajos Juhász replied to PeterPanettone's topic in Delphi IDE and APIs
Why would it matter if it is 10MB or 100MB or even 1000MB? -
Devin AI - Is it already happening?
Lajos Juhász replied to FreeDelphiPascal's topic in General Help
Please read the previous sentence: "I doubt that nobody would buy any product if it was available for free to write an AI prompt:" I wrote if AI would learn everything from our source and would be able to generate such an application. Companies would not be able to sell their products. Everyone would using AI generate the application they want / need. Without buying custom or available programs. Yes I am aware also on various "SPAM" youtube videos how you can get rich using AI using prompts to generate application for stock trading based on AI and similair. I block those videos as soon as Youtube tries to show them. -
Devin AI - Is it already happening?
Lajos Juhász replied to FreeDelphiPascal's topic in General Help
I believe the last perfect IDE was Turbo Pascal? -
Devin AI - Is it already happening?
Lajos Juhász replied to FreeDelphiPascal's topic in General Help
Usually the source code of the closed source application is a top secret. That might contain algorithms that are fine tuned, most products are developed and fined tuned for years. I doubt that nobody would buy any product if it was available for free to write an AI prompt: Write and compile an application that behaves like application X that is 200% more efficient and consumes less memory. Beside as Dalija wrote there is a chance that a large company will ignore the law. I believe there were some law suits on that matter for example the Volkswagen diesel scandal. I doubt that nobody noticed that they were breaking laws. Similairly tech companies from time to time get sued for various mistakes when they break the law. -
Avoid parameter evaluation
Lajos Juhász replied to Maxime Janvier's topic in RTL and Delphi Object Pascal
do not forget that multi-line strings completely broke the IDE. For D13 they will have to change the code in the IDE to support them. -
Add onClick event on TCanvas
Lajos Juhász replied to direktor05's topic in Algorithms, Data Structures and Class Design
you cannot do add a property to a class that doesn't have it. -
Add onClick event on TCanvas
Lajos Juhász replied to direktor05's topic in Algorithms, Data Structures and Class Design
It is TNotifyEvent = procedure(Sender: TObject) of object; To assign a value OnClick event you have to create a method with this signature. For example: type TForm1 = class(TForm) Image1: TImage; procedure FormCreate(Sender: TObject); procedure DoSomethingClick(Sender: TObject); // Event handler for an OnClick private { Private declarations } public { Public declarations } end; Then you can write in your code: procedure TForm1.FormCreate(Sender: TObject); begin Image1.OnClick:=DoSomethingClick; end; -
Devin AI - Is it already happening?
Lajos Juhász replied to FreeDelphiPascal's topic in General Help
Microsoft might or might not using Github for train AI. How can you be sure that when you send with a prompt a piece of code it is not going to be used for training the AI system. If that code contain some top secret detail. The owner of the source code could sue the developer. (I daily work on code bases that is owned by a client of the company I am working for) -
Devin AI - Is it already happening?
Lajos Juhász replied to FreeDelphiPascal's topic in General Help
Not in near future. Embarcadero made the decision to not integrate any AI yet due to possibility of security issues. Not every customer would be happy if an AI could see their source code. The code could hold sensitive data or proprietary code owned by the company or its client. The current AI systems anyway can help you only to write or check trivial code. You can achieve that using ide plugin or copy paste to AI. -
Create a new VCL application. Double click on the form to create the formcreate method and add the line to change the icon for mtInformation: procedure TForm1.FormCreate(Sender: TObject); begin MsgDlgIcons[TMsgDlgType.mtInformation]:=TMsgDlgIcon.mdiInformation; end; After the {$R *.dfm} line add: uses System.UITypes; Add a button to the form and create an onlick event: procedure TForm1.Button1Click(Sender: TObject); begin MessageDlg('test', TMsgDlgType.mtInformation, mbYesNo, 0) end;
-
MsgDlgIcons is a global variable (array) defined in VCL.Dialogs. As with any global variables there is no guarantee that somebody somewhere in the code will not change the value (searching in VCL it is a "constant variable"). If you are sure that no library you are using is not changing the value of the array you can safely change somewhere where you initialize your application.
-
“Transitive” type redefinitions in interface section
Lajos Juhász replied to Dmitry Onoshko's topic in Algorithms, Data Structures and Class Design
There is no "general rule" against. However I have had a case where the developer have had a similair idea where an access unit was introduced that used the "smaller" units where various forms, features were implemented. Fast forward 20 years and this design resulted a hell of circular references. The best way to solve it is to not use the access unit but directly add everywhere the required units and use the classess and functions directly as needed having zero circular reference. This made the compiling more stable (less errors in the IDE), parallel to this I have had to kill unit scope names. -
I would bet it is the display format on the field of the query.
-
Sooner or later you will have to rewrite the UI to be more high-DPI friendly. Changing an image should not require a lot of testing. I did that for several "1M" line of code applications without a problem. Yes it requires time, but it is a must for an old application to be able to work on "modern monitors". (A TBitbtn style program I bet looks very outdated)
-
In your example you are missing the ObjectName property it must contain the name of the table that you are querying the fields information.
-
That could explain that they are not present on FB (last post from 2022), YT last video is 3 years old.
-
It is not a rocket science to combine two files: copy /b pythone_Fixed.7z.001+pythone_Fixed.7z.002 pythone_Fixed.7z Devd gave the reason why it is not a single zip "attach 7z have 2 splits, i can't upload split2. forum limit file only 4m+ sorry"
-
7zFM from the screenshot is part of the 7zip.
-
It is strange I can open it. Combine the two split files into a .7z and you open it using Windows Explorer.
-
Here you can find out more https://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_VCL_TControlList_Control.
-
You could try something like this. Add a new private field to the form fPrevWidth: integer; procedure TForm1.FormResize(Sender: TObject); begin if (Abs(fPrevWidth-width)>50) or (GetAsyncKeyState(VK_LBUTTON) and $8000 = 0) then begin getCaption; fPrevWidth:=Width; end; end;
-
(In theory) Embarcadero tries to improove the quality of the integration. In case of the parallel debugger not the plugin is the reason but the IDE. According to David Millington it stresses the IDE and brings out error that would not surface during normal usage.
-
Using reFind to remove property of a specific component
Lajos Juhász replied to JonRobertson's topic in Tips / Blogs / Tutorials / Videos
I hope one day they will change their mind on this matter. IMHO even when migrating db related components this would be useful. -
The delay is due to the fact that whenever the users moves the mouse during the resizing the getCaption is executed. It costs time to calculate the required space for every item.
-
Existing connection forcibly closed by remote host
Lajos Juhász replied to bazzer747's topic in Databases
Unfortunately docwiki is down. I cannot comment on how you can configure SQL Server as I am not using that database. About the driver that is loaded you could try to query the FDConnection using the method GetInfoReport: https://docwiki.embarcadero.com/Libraries/Sydney/en/FireDAC.Comp.Client.TFDCustomConnection.GetInfoReport Google returned this https://stackoverflow.com/questions/64048094/connect-firedac-to-sql-server-through-odbc-driver-17-instead-of-sql-server-nativ: 1 For design time: drop a TFDPhysMSSQLDriverLink on the data module or form and set the ODBC driver to: ODBC Driver 17 for SQL Server in the drop down. After that open your TFDConnection and switch to the Info tab and check what driver it ends up using along with any notes it mentions. Note from the OP: To work for me I've needed to give a name to the TFDPhysMSSQLDriverLink component on its DriverID property, and set that name to the DriverName property of the TFDConnection.