

dmitrybv
Members-
Content Count
74 -
Joined
-
Last visited
Community Reputation
3 NeutralTechnical Information
-
Delphi-Version
Delphi 12 Athens
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Android. TDirectory.GetFiles('/storage/emulated/0/DCIM/Camera') returns an empty list
dmitrybv replied to dmitrybv's topic in Cross-platform
Hello, Dave Thanks for the demo project. Is there a more universal way to view the list of files in Android folders? Regarding the TDirectory.GetDirectories(), TDirectory.GetFiles() methods, I noticed that the TDirectory.GetDirectories('/storage/emulated/0/') method returns a list of folders similar to what is visible in the Files by Google program. Files by Google displays files in folders such as: '/storage/emulated/0/DCIM/Camera' '/storage/emulated/0/DCIM/Screenshots' '/storage/emulated/0/Documents' '/storage/emulated/0/Download' but the TDirectory.GetFiles() method does not return any files when specifying any path. What method should be used in Android to get a list of files in a folder? -
Android. TDirectory.GetFiles('/storage/emulated/0/DCIM/Camera') returns an empty list
dmitrybv replied to dmitrybv's topic in Cross-platform
Is there a Demo project in RAD Studio Samples or on github.com that demonstrates the ability to view photos in the app taken via the camera? Perhaps the TDirectory.GetFile method on Android does not work correctly or the app should request some rights via User Persmissions. -
Android. TDirectory.GetFiles('/storage/emulated/0/DCIM/Camera') returns an empty list
dmitrybv replied to dmitrybv's topic in Cross-platform
TPath.GetCameraPath() returns the following value - '/storage/emulated/0/Android/data/com.embarcadero.EhLib_Fmx_MainDemo/files/DCIM'. When viewing from the program via TDirectory.GetFile, this folder does not contain files. When viewing from the phone, I cannot access the folder ‘/storage/emulated/0/Android/data/com.embarcadero.EhLib_Fmx_MainDemo’ at all. -
Android. TDirectory.GetFiles('/storage/emulated/0/DCIM/Camera') returns an empty list
dmitrybv posted a topic in Cross-platform
Good day. Embarcadero® RAD Studio 12 Version 29.0.55362.2017 Android 13, Samsung S20. I have files taken by the camera in the folder '/storage/emulated/0/DCIM/Camera' on my phone. How to set up the Android application correctly so that I can get a list of these files? When creating an Fmx application by default, the command TDirectory.GetFiles('/storage/emulated/0/DCIM/Camera') returns an empty list. -
Class alias for class helper doesn't make class helper visible for compiler.
dmitrybv posted a topic in RTL and Delphi Object Pascal
Class alias for class helper doesn't make class helper visible for compiler. Is it possible to declare class alias for class helper with making class helper visible for compiler? Example Unit1 TControlHelper = class helper for TControl function RefSelf: TControl; end; Unit2 TControlHelper = Unit1.TControlHelper; Unit3 uses Unit2; ... var MyControl: TControl; MyControl.RefSelf //Compiler error. -
Is it possible to declare an identical type for a generic class?
dmitrybv replied to dmitrybv's topic in RTL and Delphi Object Pascal
Thank you. This code works: TListFieldLinkListEh<T: class, constructor> = class(EhLib.TableLink.TypedLists.TListFieldLinkListEh<T>); TTypedListItemLinkEh<T: class, constructor> = class(EhLib.TableLink.TypedLists.TTypedListItemLinkEh<T>); TListRecLinkListEh<T: class, constructor> = class(EhLib.TableLink.TypedLists.TListRecLinkListEh<T>); TListTableLinkEh<T: class, constructor> = class(EhLib.TableLink.TypedLists.TListTableLinkEh<T>); In this case, however, a new type is created. But for types created through generics this is not a very big problem. -
Is it possible to declare an identical type for a generic class?
dmitrybv posted a topic in RTL and Delphi Object Pascal
Is it possible to declare an identical type for a generic class? I can't do it. TTypedListFieldLinkEh = EhLib.TableLink.TypedLists.TTypedListFieldLinkEh; TListFieldLinkListEh = EhLib.TableLink.TypedLists.TListFieldLinkListEh; TTypedListItemLinkEh = EhLib.TableLink.TypedLists.TTypedListItemLinkEh; TListRecLinkListEh = EhLib.TableLink.TypedLists.TListRecLinkListEh; TListTableLinkEh = EhLib.TableLink.TypedLists.TListTableLinkEh; TListFieldLinkListEh<T: class, constructor> = EhLib.TableLink.TypedLists.TListFieldLinkListEh<T: class, constructor>; //Compile Error TTypedListItemLinkEh<T: class, constructor> = EhLib.TableLink.TypedLists.TTypedListItemLinkEh<T: class, constructor>; TListRecLinkListEh<T: class, constructor> = EhLib.TableLink.TypedLists.TListRecLinkListEh<T: class, constructor>; TListTableLinkEh<T: class, constructor> = EhLib.TableLink.TypedLists.TListTableLinkEh<T: class, constructor>; -
GExperts now fixes yet another annoyance in the Delphi IDE: Desktops
dmitrybv replied to dummzeuch's topic in GExperts
Hello. I would like to thank you for supporting GExperts. I am using GExperts_RS12_1.3.25_2024-08-24.exe in RAD Studio 12.3. I use only three functions: SortLines, PreviousIdent, NextIdent. These functions work in RAD Studio 12.3 without errors. -
C:\RADStudio\22.0\bin\dcc64.exe, error F2084: Internal Error: IRR928
dmitrybv posted a topic in Delphi IDE and APIs
Embarcadero® RAD Studio 11 Version 28.0.48361.3236 Please tell me what could be causing this error. C:\RADStudio\22.0\EhLib\Src>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild EhLibRtl.dproj /t:Build /p:Config=Release /p:platform=Win64 || Pause Microsoft (R) Build Engine version 4.8.9037.0 [Microsoft .NET Framework, version 4.0.30319.42000] Copyright (C) Microsoft Corporation. All rights reserved. Build started 16/03/2025 22:50:46. Project "C:\RADStudio\22.0\EhLib\Src\EhLibRtl.dproj" on node 1 (Build target(s)). CreateProjectDirectories: Creating directory "..\Lib\Win64\Release\". md "..\Lib\Win64\Release\" Creating directory "C:\RADStudio\22.0\EhLib\Dcp\Win64\". md "C:\RADStudio\22.0\EhLib\Dcp\Win64\" Creating directory "..\Hpp\Win64\". md "..\Hpp\Win64\" Creating directory "C:\RADStudio\22.0\EhLib\Bpl\Win64\". md "C:\RADStudio\22.0\EhLib\Bpl\Win64\" BuildVersionResource: C:\RADStudio\22.0\bin\cgrc.exe -c65001 EhLibRtl.vrc -foEhLibRtl.res CodeGear Resource Compiler/Binder Version 1.2.2 Copyright (c) 2008-2012 Embarcadero Technologies Inc. Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0 Copyright (C) Microsoft Corporation. All rights reserved. Deleting file "EhLibRtl.vrc". del "EhLibRtl.vrc" _PasCoreCompile: C:\RADStudio\22.0\bin\dcc64.exe -$D0 -$L- -$Y- --no-config -B -Q -Z -TX.bpl -AGenerics.Collections=System.Generics.Co llections;Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;Dbi Procs=BDE;DbiErrs=BDE -DRELEASE -E.\Win64\Release -Ic:\radstudio\22.0\lib\Win64\release;C:\Users\BDV\Documents\Embarc adero\Studio\22.0\Imports;C:\RADStudio\22.0\Imports;C:\RADStudio\22.0\EhLib\Dcp\Win64;C:\RADStudio\22.0\include -LEC: \RADStudio\22.0\EhLib\Bpl\Win64 -LNC:\RADStudio\22.0\EhLib\Dcp\Win64 -NU..\Lib\Win64\Release -NSWinapi;System.Win;Dat a.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;System;Xml;Data;Datasnap;Web;Soap; -Oc:\radstudio\22.0\lib\Win64\release; C:\Users\BDV\Documents\Embarcadero\Studio\22.0\Imports;C:\RADStudio\22.0\Imports;C:\RADStudio\22.0\EhLib\Dcp\Win64;C: \RADStudio\22.0\include -Rc:\radstudio\22.0\lib\Win64\release;C:\Users\BDV\Documents\Embarcadero\Studio\22.0\Imports; C:\RADStudio\22.0\Imports;C:\RADStudio\22.0\EhLib\Dcp\Win64;C:\RADStudio\22.0\include -Uc:\radstudio\22.0\lib\Win64\r elease;C:\Users\BDV\Documents\Embarcadero\Studio\22.0\Imports;C:\RADStudio\22.0\Imports;C:\RADStudio\22.0\EhLib\Dcp\W in64;C:\RADStudio\22.0\include --description:"EhLib RunTime Package" -JL -NBC:\RADStudio\22.0\EhLib\Dcp\Win64 -NH..\H pp\Win64 -NOC:\RADStudio\22.0\EhLib\Dcp\Win64 EhLibRtl.dpk Embarcadero Delphi for Win64 compiler version 35.0 Copyright (c) 1983,2021 Embarcadero Technologies, Inc. Rtl\EhLibUtils.pas(2076): error F2084: Internal Error: IRR928 [C:\RADStudio\22.0\EhLib\Src\EhLibRtl.dproj] Done Building Project "C:\RADStudio\22.0\EhLib\Src\EhLibRtl.dproj" (Build target(s)) -- FAILED. Build FAILED. "C:\RADStudio\22.0\EhLib\Src\EhLibRtl.dproj" (Build target) (1) -> (_PasCoreCompile target) -> Rtl\EhLibUtils.pas(2076): error F2084: Internal Error: IRR928 [C:\RADStudio\22.0\EhLib\Src\EhLibRtl.dproj] 0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.85 Press any key to continue . . . When compiling via IDE, no error occurs. -
TValue.IsType<String> for Variant(Interface) is very slow.
dmitrybv posted a topic in RTL and Delphi Object Pascal
Hello. The following code takes 0.1 seconds on my computer. In my opinion, this is too slow. procedure TFormSimpleDraw2.Button4Click(Sender: TObject); var ItfcVarValue: TValue; Itfc: IInterface; VarValue: Variant; Res: Boolean; begin Itfc := TInterfacedObject.Create; VarValue := Itfc; ItfcVarValue := TValue.From<Variant>(VarValue); var TimeSpan := TThread.GetTickCount64; Res := ItfcVarValue.IsType<String>; Memo1.Lines.Add(FloatToStr((TThread.GetTickCount64 - TimeSpan) / 1000) + ' sec; Result = ' + Res.ToString(TUseBoolStrs.True)); end; Result in Memo1 Memo1.Text = 0.109 sec; Result = False Most likely the reason is related to the occurrence of an internal exception which is then suppressed somewhere. ---- procedure TFormSimpleDraw2.Button5Click(Sender: TObject); var Res: Boolean; ItfcVarValue: TValue; begin ItfcVarValue := TValue.From<IInterface>(TInterfacedObject.Create); var TimeSpan := TThread.GetTickCount64; Res := ItfcVarValue.IsType<String>; Memo1.Lines.Add(FloatToStr((TThread.GetTickCount64 - TimeSpan) / 1000) + ' sec; Result = ' + Res.ToString(TUseBoolStrs.True)); end; Memo1.Text = 0 sec; Result = False -
How to check that TValue.Type is array of TValue
dmitrybv replied to dmitrybv's topic in RTL and Delphi Object Pascal
Since I only use dynamic arrays I used the following solution: function ValueIsArrayOfValues(const V: TValue): Boolean; begin Result := V.TypeInfo = TypeInfo(TArray<TValue>); end; -
How to check that TValue.Type is array of TValue
dmitrybv replied to dmitrybv's topic in RTL and Delphi Object Pascal
I think like this: function ValueIsValueArray(const V: TValue): Boolean; begin Result := (V.TypeInfo <> nil) and (V.TypeInfo^.Kind in [tkArray, tkDynArray]); if Result then Result := (V.TypeData^.ArrayData.ElType = TypeInfo(TValue)); end; -
How to check that TValue.Type is array of TValue
dmitrybv posted a topic in RTL and Delphi Object Pascal
Hello How to check that TValue.Type is array of TValue function ValueIsValueArray(const V: TValue): Boolean; begin Result := V.TypeInfo = System.TypeInfo(array of TValue); //?? end; -
EhLib 12.0 beta supports Fmx. It includes Fmx.TDataGridEh. https://forum.ehlib.com/en/viewtopic.php?f=4&t=1291
-
Good day. I have Embarcadero® RAD Studio 12 Version 29.0.53982.0329 Tell me how to work with the FMX.WebBrowser.TWebBrowser component correctly I drop TWebBrowser on the Form. The code is written procedure TMainForm.Button1Click(Sender: TObject); begin WebBrowser.Navigate('https://getbootstrap.com/docs/5.3/getting-started/introduction/'); end; and as a result I get the following picture: It looks like the browser is not processing the css and aside section of the page.