Lajos Juhász
-
Content Count
987 -
Joined
-
Last visited
-
Days Won
12
Posts posted by Lajos Juhász
-
-
5 minutes ago, Angus Robertson said:{$IF Declared(RTLVersion123)}Result := '12.3';{$IFEND} // guessing
Embarcadero could have that: https://docwiki.embarcadero.com/Libraries/Athens/en/System
RTLVersion RTLVersion: Comp = 36; RTLVersion121 RTLVersion121: Boolean = True; RTLVersion122 RTLVersion122: Boolean = True; RTLVersion123 RTLVersion123: Boolean = True; -
program Project1; {$APPTYPE CONSOLE} {$R *.res} uses System.Classes, Winapi.Windows; type TMyRecord = class data: Integer; class procedure Queue(const AThread: TThread; AMethod: TThreadProcedure); end; class procedure TMyRecord.Queue(const AThread: TThread; AMethod: TThreadProcedure); begin OutputDebugString(PChar('In TMyRecord.Queue')) end; begin TThread.Queue(nil, procedure begin OutputDebugString(PChar('Hello !')) end); TMyRecord.Queue(nil, procedure begin OutputDebugString(PChar('Hello !')) end); end.
It should be TThreadProcedure not method.
- 1
-
25 minutes ago, krayna said:Yes, I know this, but with Firebird it was no problem even if I didn´t set the data type before calling prepare. It´s a big project and I would have to change a lot of code for this. I just wondered why this was never an issue with Firebird and now it´s a problem with PostgreSQL.
FireDAC is very strict. When I have moved projects from BDE and DBX that involved a lot of changes.
-
9 minutes ago, A.M. Hoornweg said:Static class methods are unable to access any members or methods that require a "self" parameter.
As a result it can not be assigned to an event.
-
You can set the datatype before prepare qryWork.Params[0].DataType:=ft...... the data type of field1.
-
13 minutes ago, Vincent Gsell said:Doc on Skia Github page contains usefull code :
https://docwiki.embarcadero.com/Libraries/Athens/en/FMX.Skia.SkImageToBitmap
this is fmx while the question is about VCL.
-
You can change it on a new form and leave parentfont to true on the components you drop. You should accept the new default font. On newer monitors event font size 9 is a bit hard to read.
-
No, a file is a file a folder is a folder two different things. In case of a folder you should use the TPath (record).
attributes:=TPath.GetAttributes(PathName)
-
You have some hidden unicode character there. It can happen if you copy paste from the internet.
var FileName : String; attributes: TFileAttributes; begin FileName := 'Test'; attributes:= TFile.GetAttributes(FileName); Include(attributes, TFileAttribute.faHidden); TFile.SetAttributes(FileName, attributes); end;
This compiles.
-
According to the documentation the object property of the stringlist is used to handle the shortcuts not the text version:
TCustomShortCutList is a descendant of TStringList, which manages a collection of strings. As such, TCustomShortCutList adds, deletes, and searches for shortcuts using their text representation. TCustomShortCutList stores shortcuts that correspond to a text representations as values of the Objects property for these strings. Do not change values of the Objects property, or the shortcut list will not operate correctly.
-
In the official documentation there is no mention that it would be a language specific shortcut:
Description
Stores shortcuts (in addition to ShortCut) for triggering the action.
Actions can execute in response to multiple shortcut key combinations. SecondaryShortCuts lists all the shortcut key combinations (other than the one specified by the ShortCut property) that can trigger the action. This lets you provide additional, secondary shortcuts.
When the user types one of the key combinations listed in SecondaryShortCuts, the action's Execute method is called.
-
8 minutes ago, ertank said:Delphi is giving problems on Windows 11 and identical (down to installed components) system on Windows 10 works just fine.
In that case I am the unlucky one. Have had no issues using Delphi 12.2 update 1 on Windows 11.
- 1
- 1
-
I would recommend to use only that threading library not the others you will save a lot of time.
A more serious answer is that you should give us more details. Anyo of those can create a thread which library to choose really depends on the requirements.
-
9 hours ago, Stefan Glienke said:Yes, pretty much - we all know they first ship a half-baked feature to generate marketing hype and then spend the next decade tinkering around the edges to make it work while representatives are telling us "eh, its complicated"
I believed it is a different aproach. They give to us something that compiles and is working. Then based on user review and bug reports they are accepting suggestions how to make it work. If everything else fail they buy some source code to make things working again.
- 1
-
I have no problem to compile it:
const // The highlight colors here are defined twice so the compiler doesn't complain. YELLOW = $00BBFF; BLUE = $F0CF89; HIGHLIGHT_COLORS: array[0..1] of TColor = (YELLOW, BLUE);
You can also compile:
const // The highlight colors here are defined twice so the compiler doesn't complain. YELLOW = TColor($00BBFF); BLUE = TColor($F0CF89); HIGHLIGHT_COLORS: array[0..1] of TColor = (YELLOW, BLUE);
-
19 minutes ago, dummzeuch said:I think that's a pretty clean installation.
Try without GExperts.
-
1 hour ago, emileverh said:So again; is there a way to force delete a file?
No there is no way if the file is locked it is not going to be deleted.
You should first try to add:
If FileExists(lTempFolderFullFileName) then
if not DeleteFile(lTempFolderFullFileName ) then
SendMadBugReport(Self, 'CopyFileToTempFolder(), delete failed'); // <<<<<<<< HERE IT FAILS!!!!!!!
Why do you have an empty try ... except block? That is very dangerous at least you should send a bug report with the exception. Ignoring an exception can lead to other bugs in a program.
- 1
-
You should check GetLastError to see the reason why it fails. https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-deletefile
One of the possible reason is that the file doesn't exists and the other is that the file is in use by other application.
-
TFDPhysMSSQLDriverLink has an ODBCDriver property, I have no server to test it.
-
-
A quick search returned instead of PToken_User it is definied as PTokenUser in Winapi,Windows.
-
I have tested F2 or shift+f2 will focus the Object inspector in Form Designer for Delphi XE5, Delphi 11.2 and Delphi 12.2 patch 1.
-
37 minutes ago, shun said:Are there any limitations I should be aware of when using the Community Edition for such purposes?
The only limitation I can think of that will most probably be a big no for you is the revenue clause for the companies that want to install the community edition (https://www.embarcadero.com/products/cbuilder/starter):
- Licensed for use until your individual revenue from C++Builder applications or company revenue reaches $5,000 US or your development team expands to more than 5 developers
It is meant only for a start-up companies that don't have a product yet. I safer choice would be to test your code base using the trial version.
-
I have never tried batchmove. A simple optimization would be not to use AItem.DestField.FieldName in that event, instead you could try AItem.Index or AItem.Destfield.
How to refer to a single value from an enumerated type declared in a set type?
in RTL and Delphi Object Pascal
Posted
OP is on older version of Delphi 10.4 your example is Delphi 12.