

Kazantsev Alexey
-
Content Count
26 -
Joined
-
Last visited
-
Days Won
2
Posts posted by Kazantsev Alexey
-
-
1 hour ago, EugeneK said:It have to be somewhere on Windows machine
Press [Update Local File Cache] in SDK Manager after libgtk-3-dev installed.
-
1
-
1
-
-
type TForm1 = class(TForm) ListView1: TListView; procedure FormCreate(Sender: TObject); procedure ListView1UpdateObjects(const Sender: TObject; const AItem: TListViewItem); procedure FormDestroy(Sender: TObject); private FCustomItem : TListViewItem; FBitmap : TBitmap; public { Public declarations } end; var Form1: TForm1; implementation {$R *.fmx} procedure TForm1.FormCreate(Sender: TObject); begin for var i := 1 to 25 do ListView1.Items.Add.Text := Format('item #%u', [i]); FCustomItem := ListView1.Items[4]; FCustomItem.Text := 'Custom Background Item'; var c := TAlphaColorRec.Orangered; TAlphaColorRec(c).A := 64; FBitmap := TBitmap.Create(8, 8); FBitmap.Clear(c); end; procedure TForm1.FormDestroy(Sender: TObject); begin FBitmap.Free; end; procedure TForm1.ListView1UpdateObjects(const Sender: TObject; const AItem: TListViewItem); begin if AItem = FCustomItem then begin var Bkgnd := TListItemImage.Create(nil); Bkgnd.ScalingMode := TImageScalingMode.Stretch; Bkgnd.OwnsBitmap := False; Bkgnd.Bitmap := FBitmap; AItem.View.Insert(0, Bkgnd); end; end;
-
2
-
-
program Project1; {$APPTYPE CONSOLE} uses System.Rtti; type TvatIndividual = record DocumentNumber: string; TurnoverDate: TDate; PaymentDate: TDate; DocumentType: string; Year: integer; TurnoverDescription: string; TurnoverAmount: Currency; end; begin for var f in TRttiContext.Create.GetType(TypeInfo(TvatIndividual)).GetFields do WriteLn(f.ToString); ReadLn; end.
-
1
-
2
-
-
7 hours ago, dmitrybv said:Compilation via dcclinux64.exe
You need to specify parameters --libpath and --syslibroot. Values can find in SDK Manager.
-
2 hours ago, Nicolò Blunda said:Is there a way to change the font size in the Style file (read with the TStyleBook component) or is there a workaround?
You can register your own IFMXSystemFontService.
-
1
-
-
Use ampersand operator, Luke.
program Project2; {$APPTYPE CONSOLE} uses System.TypInfo; {$SCOPEDENUMS ON} type TEnums = (&TRY, &SHR, &XOR, &IS, &AS); begin WriteLn(GetEnumName(TypeInfo(TEnums), Ord(TEnums.SHR))); WriteLn(GetEnumValue(TypeInfo(TEnums), 'shr')); ReadLn; end.
Output:
SHR 1
-
2
-
2
-
-
11 hours ago, Marus said:I need a safe way to allocate memory for a string variable, without getting exceptions. I don't want to use "try-except" blocks and neither the function that do this, use them internaly. I need a speed optimised method. If there are errors it can return a nil pointer.
I checked the GetMem, AllocMem, GetMemory... and they all say that raise exceptions. Although I looked to the GetMemory code but I didn't see any code that raise exceptions.
You can use SysGetMem, SysReallocMem, SysFreeMem.
-
2 hours ago, Stefan Glienke said:Would be interested to see the difference between what dcc64 and fpc emit though - can do share the benchmark code somewhere?
Sorry for dirty adaptation
-
1
-
-
-
3 hours ago, Rollo62 said:This number comes maybe from somewhere else
Try to check file version of your delphide280.bpl (or just run Delphi only, not RAD Studio)
-
-
4 hours ago, vfbb said:Unfortunately I don't have any mac arm to confirm.
You don't need mac to compile units. Just use command line compiler to compile this unit:
unit def; interface implementation {$if defined(MACOS)} {$message hint 'MACOS defined'} {$endif} end.
-
1
-
-
-
4 hours ago, Kazantsev Alexey said:library rtltest; //{$weaklinkrtti on} uses system.classes; begin TMemoryStream.Create.Free; end.
Delphi XE2, x86_64, Release:
default - 547840 bytes
+ weaklinkrtti on - 505344 bytes
+ custom rtl build with minimal rtti - 256000 bytes
The same example on 10.4.2:
1770kb, 1279kb, 456kb -
1 hour ago, Fr0sT.Brutal said:How did you produce custom RTL build?
For XE2 you need explicitly rebuild the three files (for latest versons need some more rtl files be rebuilded):
system.pas (with key -Y)
system.sysutils.pas (with key -V-)
system.variants.pas (with key -V-)
(search path should include rtl sources)When project building seach path should include your own custom rtl dcus, and rtl sources after it.
-
1
-
-
1 hour ago, Fr0sT.Brutal said:I have x64 DLL that uses SysUtils and DateUtils weighting 590 Kb compiled with XE2.
library rtltest; //{$weaklinkrtti on} uses system.classes; begin TMemoryStream.Create.Free; end.
Delphi XE2, x86_64, Release:
default - 547840 bytes
+ weaklinkrtti on - 505344 bytes
+ custom rtl build with minimal rtti - 256000 bytes
-
1
-
-
7 hours ago, Anders Melander said:Um... Aren't you responsible for initializing the record yourself if you have declared an initializer for the record?
The error is not in the implementation of the custom initializer. A custom initializer is available for the “TRec” type, but an initialization error is in the “TData” type, which does not have a custom initializer, but has a field of a managed type. In the code example, you can replace the custom initializer with any other custom management operator (finalizer, assign), and you will get the same error.
-
3
-
-
-
5.5. It also makes sense to change the clHighlightText color for better look of some IDE parts (ObjectInspector, Options Dialogs, New Items dialog).
-
13 hours ago, fugitivox said:how would I change "SysColors.clHighlight" from version 10.3.2?
1. Run any resource editor (ResourceHacker, for example) and open ModernTheme260.bpl
2. Extract resource "WIN10IDE_LIGHT" to file *.vsf
3. Open saved file in the Bitmap Style Designer ($(BDSBIN)\BitmapStyleDesigner.exe)
4. In the tree-structure "Objects" find node "SysColors" and item "clHighlight"
5. Change the "clHighlight" to you prefered color
6. Save modified style and close Style Designer
7. Using resource editor replace resource "WIN10IDE_LIGHT" in ModernTheme260.bpl by the modified style file.-
1
-
1
-
-
40 minutes ago, fugitivox said:how to export the IDE theme from 10.3.1 to 10.3.2?
Export is not required, it's the same theme. Changed the drawing method.
-
1
-
-
Your can extract WIN10IDE_LIGHT resource from ModernTheme260.bpl, change SysColors.clHighlight by the BitmapStyleDesigner.exe and replace the style resource.
https://i.imgur.com/lrod4rO.png
But it will affects on the some other UI elements, M main menu items, for example.
https://i.imgur.com/sTV5O83.png
-
3 hours ago, Richard_Stevens said:does anybody know if can I change this anywhere?
Set "Dark" IDE Theme.
-
1
-
-
Run Android Tools and select following packages to install:
1. [x] Android SDK Platform-Tools
2. [x] Android SDK Build-tools 28.0.2
3. Android 8.0.0 (API 26)
[x] SDK Platform-
1
-
programmatically determine the edition of RAD Studio 12.3
in Delphi IDE and APIs
Posted
Look at https://docwiki.embarcadero.com/RADStudio/Alexandria/en/IDE_Command_Line_Switches_and_Options for bds.exe /ProductInfo:SKU