Lajos Juhász
Members-
Content Count
986 -
Joined
-
Last visited
-
Days Won
12
Everything posted by Lajos Juhász
-
Beginner to Delphi. Have no idea what I'm doing wrong here
Lajos Juhász replied to Willicious's topic in Delphi IDE and APIs
Can you explain how? The help clearly states CharInSet checks whether a given character is contained within a set of AnsiChar. -
Set Parent of Component to Application.MainForm from Unit
Lajos Juhász replied to egnew's topic in VCL
TApplication.CreateForm in the first place must create the instance (when the formcreate is called) and just after can assign it to mainform. You can do TMainForm.FormCreate(Sender: TObject); begin ..... MakeSurface(self); For me it's always a code smell when somebody uses a global variable or reference. -
Set Parent of Component to Application.MainForm from Unit
Lajos Juhász replied to egnew's topic in VCL
A simple debug would tell you the reason. At the moment of Application.MainForm.Formcreate the Application.MainForm property is nil. -
I've noticed in the past that the IDE doesn't mark a file as changed when you only change the DFM and not the pas.
-
Combobox1.Items.AddObject(....)
Lajos Juhász replied to Henry Olive's topic in RTL and Delphi Object Pascal
You should read the code: SQLQuery1.Fields[1].asInteger integer value of the field converted to a pointer. The problem here is that the id is not going to be a continous enumeration starting from 0. -
Combobox1.Items.AddObject(....)
Lajos Juhász replied to Henry Olive's topic in RTL and Delphi Object Pascal
I think this is a very bad idea. You code doesn't compiles as you're missing a letter s, the property nam is objects: Combobox1.ItemIndex := Integer(Combobox1.Items.Objects[Combobox1.ItemIndex]); -
Beginner to Delphi. Have no idea what I'm doing wrong here
Lajos Juhász replied to Willicious's topic in Delphi IDE and APIs
For me this is working with VCL. I set the timer to 250ms. unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls; type TDirection = (dinone, diup, didown, dileft, diright); TForm1 = class(TForm) box: TShape; Timer1: TTimer; procedure Timer1Timer(Sender: TObject); procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); private { Private declarations } fDirection: TDirection; public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin case key of ord('W'): fdirection:=diup; ord('A'): fDirection:=diLeft; ord('D'): fDirection:=diRight; ord('X'): fDirection:=diDown; else fDirection:=diNone; end; end; procedure TForm1.Timer1Timer(Sender: TObject); begin case fDirection of diup : box.Top:=box.top-10; didown : box.Top:=box.Top+10; dileft: box.left:=box.Left-10; diright: box.Left:=box.Left+10; end; end; end. -
Beginner to Delphi. Have no idea what I'm doing wrong here
Lajos Juhász replied to Willicious's topic in Delphi IDE and APIs
If Movement = 'Down' then Square.Top:= Square.Top + 10; -
You can have a strong belief that the Earth is flat but that will not change the fact that isn't. Yes, I know that the Flat Earth Society has members from all around the globe.
-
Which library for "Small" Graphics Application, GR32, GDI+, Skia, ...
Lajos Juhász replied to cltom's topic in VCL
For Delphi the future could be Skia. There was a weak promise that in the next major release maybe the VCL is going to use it. -
ballpointer:=ballpointer+1; // +1 here is SizeOf Most probably you're using a Unicoder version of Delphi where the compiler is aware that PChar is 2 bytes.
-
You should post a real demo that we can compile where you get that kind of error. When it's correctly you can not get thet runtime error.
-
Only Delphi 11 supports binary constant in the code prefixed with %. In order to use the source in older version of Delphi you should convert the constant to hex or decimal numbers.
-
Alexandria 11.3 - Firedac/OnValidate String Field
Lajos Juhász replied to Antonio Gomes's topic in Databases
Unfortunately I can reproduce the bug. -
D11 Update 1 + FireDAC + ODBC to Sage returning wrong data!
Lajos Juhász replied to Jasonjac2's topic in Databases
Now I see that TFDDataSet.SaveToStorage indeed is calling CheckFetchedAll - now I would like to know the reason why is that required. -
D11 Update 1 + FireDAC + ODBC to Sage returning wrong data!
Lajos Juhász replied to Jasonjac2's topic in Databases
You cannot hook up DB controls to an unidirectional query but that should not stop you from inspecting and saving it. I am using FireDAC with ODBC driver from the first version (to connect to Informix database). The data is never corrupted. The only problem I am aware is when writing to database FireDAC ignores the database locale and uses the default Windows locale for non-unicode language to write data. -
JEDI Installation Annoyances 10.4
Lajos Juhász replied to PeterPanettone's topic in Tips / Blogs / Tutorials / Videos
You get an error message because the package you try to install is a run time, not a design time package -
How to remove metadata from Word document (using OLE)
Lajos Juhász replied to Kevin Smith's topic in General Help
I believe you would have to do that in Word: (WINDOWS) Microsoft Word 2010, 2013, 2016: Go to “File” Select “Info” Click on “Check for issues” Click on “Inspect document” In the “Document Inspector” dialog box, select the check boxes to choose the types of hidden content that you want to be inspected. Click “Remove All” Click “Close” Save the document. -
Async/Await with updating visual controls
Lajos Juhász replied to omnibrain's topic in OmniThreadLibrary
Today it's an example. Tomorrow you or somebody else sees the code and use it in a real application. Copy paste errors are always a fun thing to search for or debug. -
Same for me, it would be easier to create bug reports.
-
My bet is on stack overflow. You should try to debug the IDE to catch the reason.
-
It's also bad idea that they've changed the install folder for KonopkaControls when installed from GetIt. If you have multiple registry entries you have to update them manually (IMHO there should be options when downloading from GetIt to update it).
-
Didn't noticed it's Gexpert....
-
GetIt worked ok 4.5 hours ago.
-
FreeAndNil 10.4 vs 10.3.1 and Pointers
Lajos Juhász replied to Sherlock's topic in RTL and Delphi Object Pascal
Nice catch, first read the full documentation of the procedure: Embarcadero Technologies does not currently have any additional information. If you're for some strange reason not satisfied with the official documentation check out the source code: { CPPFreeAndNil is a helper to implement a C++ type-safe FreeAndNil }