Jump to content

programmerdelphi2k

Members
  • Content Count

    1406
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by programmerdelphi2k

  1. programmerdelphi2k

    File Search

    just look my sample and use a "FOR"...looping to catch each element from arrary... but you are doing a "recursive called"... then needs some adjusts dont forget: you needs add a FindClose(... sr ) in your code
  2. programmerdelphi2k

    File Search

    I only reprodure that "asker" have showed in your post... if you want use any other "container", you're free for that!
  3. programmerdelphi2k

    Using inline variables inside loops

    firstly, I think that not right way to do it, but, as the var is allocated on stack, and the var-life is "short"! then, the next round, var will "dead", and create a new var on memory same address (if not used yet)!
  4. programmerdelphi2k

    File Search

    procedure MyFindFilePattern(AFolderRoot: string; APatternToSearch: array of string; const AListBox: TListBox); var LSearchRecord: TSearchRec; LIsDirectory : boolean; LContinue : boolean; begin for var LPattern in APatternToSearch do begin LContinue := FindFirst(IncludeTrailingPathDelimiter(AFolderRoot) + LPattern, faAnyFile, LSearchRecord) = 0; // if LContinue then try while LContinue do begin LIsDirectory := ((LSearchRecord.Attr and faDirectory) = faDirectory); // if not((LSearchRecord.Name = '.') or (LSearchRecord.Name = '..')) then begin if LIsDirectory then AListBox.Items.Add('Dir: ' + LSearchRecord.Name) else AListBox.Items.Add('File: ' + LSearchRecord.Name); end; // LContinue := FindNext(LSearchRecord) = 0; end; finally FindClose(LSearchRecord); end; end; end; procedure TForm1.Button1Click(Sender: TObject); begin MyFindFilePattern('d:\MyZip', ['*.zip', '*.txt'], ListBox1); end;
  5. programmerdelphi2k

    Delphi 10.4.2 add support for Android 13

    you should use the version installed when RAD was installed, it's preferible. you can copy from any other PC with RAD 10.4... BUT read the RAD 10.4.x Help about SDK/NDK Android: Android 13 not supported in RAD 10.4 only Android 5.1 to Android 10.0 https://docwiki.embarcadero.com/RADStudio/Sydney/en/Android_Devices_Supported_for_Application_Development https://docwiki.embarcadero.com/RADStudio/Sydney/en/Installing_the_Android_Development_Tools
  6. programmerdelphi2k

    Delphi 10.4.2 add support for Android 13

    ok... try as was said before!
  7. programmerdelphi2k

    Delphi 10.4.2 add support for Android 13

    SdkManager try UPDATE the packages already downloaded, NOT INSTALL NEW PCKG
  8. programmerdelphi2k

    Delphi 10.4.2 add support for Android 13

    always need say where SDK is in! because you can download many others versions u see?
  9. programmerdelphi2k

    Delphi 10.4.2 add support for Android 13

    SdkManager download only SDK packages, if need download NDK (if you dont have it) try directly from Google, but remember: Embarcadero dont use the last updates, then use the expected only. https://developer.android.com/ndk/downloads
  10. programmerdelphi2k

    Delphi 10.4.2 add support for Android 13

    maybe residual files when using Android Studio, try delete this folder: .Android
  11. programmerdelphi2k

    Delphi 10.4.2 add support for Android 13

    if you run SdkMaganer, by default it try updates your files (packages), else you need "say" what install or update... you see?
  12. programmerdelphi2k

    File Search

    for sure, just do it as expected... 😉
  13. programmerdelphi2k

    Delphi 10.4.2 add support for Android 13

    @hackbrew my tip 1: use a "short path to SDK/NDK folders" like: c:\mySDKs\AndroidSDK25 c:\mySDKs\AndroidNDK21 it's more easy to works, including when use SdkManager --sdk_root=.... you see? now, next... set the environment var REPO_OS_OVERRIDE=windows use SDKManager to see what packages YOU HAVE, and what YOU WANT!!! --List / --List_Installed update or install it.... --update / --install try this tips after all, use RAD options to create you new Sdk/Ndk setup. pay attention if you are using the JavaJdk OR AdoptOpenJdk in you "PATH" enviroment variable!
  14. programmerdelphi2k

    File Search

    @robertjohns try this: implementation {$R *.dfm} procedure MyFindFilePattern(AFolderRoot: string; APatternToSearch: string; const AListBox: TListBox); var LSearchRecord: TSearchRec; LIsDirectory : boolean; LContinue : boolean; begin LContinue := FindFirst(AFolderRoot + '\' + APatternToSearch, faAnyFile, LSearchRecord) = 0; try // while LContinue do begin LIsDirectory := ((LSearchRecord.Attr and faDirectory) = faDirectory); // if (LSearchRecord.Name <= '..') then begin LContinue := FindNext(LSearchRecord) = 0; // continue; end; // if LIsDirectory then AListBox.Items.Add('Dir: ' + LSearchRecord.Name) else AListBox.Items.Add('File: ' + LSearchRecord.Name); // LContinue := FindNext(LSearchRecord) = 0; end; finally FindClose(LSearchRecord); end; end; procedure TForm1.Button1Click(Sender: TObject); begin ListBox1.Items.Clear; // ListBox1.Items.Add(' ------ *.* ------'); // MyFindFilePattern('D:\MyZip', '*.*', ListBox1); // ListBox1.Items.Add(' ------ complete filename ------'); // MyFindFilePattern('D:\MyZip', 'MyNewZip.zip', ListBox1); end;
  15. programmerdelphi2k

    Delphi 10.4.2 add support for Android 13

    @hackbrew look, really you dont need Android Studio! then, try this: when you install your RAD, you'll have SDK (almost empty), and NDK (basic content) folders! ok -> BUT, you can "COPY" (this folders it's not really installed by "installer", just unziped) this folders from any PC, just stay alert about version used for each RAD!!! this said, you can copy from another pc (or install a RAD in a VM and copy this 2 folders... later, just delete a new VM) now, in "CMDLINE-TOOLS\bin" folder you have the "SKDManager.bat", if DONT, just download the last version from "cmdline-tools" from Android Studio official site now, just do it as above!
  16. I think that it's NOT expected a pointer here, not? (a pointer is always a number not?) https://docwiki.embarcadero.com/Libraries/Sydney/en/System.Generics.Collections.TList.Sort
  17. @Alexander Halser try this.. uses Generics.Defaults; var intList: TList<Integer>; begin intList := TList<Integer>.Create; try // Add some integer values to the list intList.Add(3); intList.Add(1); intList.Add(7); intList.Add(4); // Sort the list in ascending order intList.Sort(TComparer<Integer>.Construct( function(const Left, Right: Integer): Integer begin if Left < Right then Result := -1 else if Left > Right then Result := 1 else Result := 0; end)); // Do something with the sorted list // ... finally intList.Free; end; end.
  18. programmerdelphi2k

    Grid background color

    you can just change the COLOR to null color
  19. programmerdelphi2k

    File Search

    @robertjohns you can test if is a Directory using LIsDirectory := ((FileGetAttr(LFilename) and faDirectory) = faDirectory);
  20. programmerdelphi2k

    Grid background color

    here works, at least!
  21. programmerdelphi2k

    Delphi 10.4.2 add support for Android 13

    not problem, see on SDK Manager tab the line SDK API Level, there youchoice what API you can use when compiling... same that your target dont use last version https://docwiki.embarcadero.com/RADStudio/Alexandria/en/SDK_Manager
  22. programmerdelphi2k

    Delphi 10.4.2 add support for Android 13

    I think that should be %PATH% or any other environment variable NOT? in fact, you dont need add cmd-tool path on O.S. "PATH' , because that Android use itself vars and setup to find all tools, like do the Delphi when building... of course, you can do it, but it's not really necessary. See the Android.Bat and all batch files called... all it's defined for it. Java/AdoptOpen define its var on O.S. "PATH" var when installed. of course, verify if dont exists more than one on PATH!!!
  23. programmerdelphi2k

    Community license

    As I said above, imagine the scenario: An avid programmer in Delphi, is on a trip, and takes the opportunity to debug his code, and, unfortunately, connects to the public and open Wifi at the train/metro station... he runs his application developed in Delphi CE, and, ... days later, the train/metro company receives a letter from Embarcadero saying that he "must" buy (without delay) a Professional or Enterprise license of Delphi, because it was detected that a Delphi CE application was being used on the day xx/xx/xxxx at xx:xxhr... and the company it's not eligible for $5000/year Isn't this a dire situation caused by Embarcadero's type of marketing?
  24. programmerdelphi2k

    Delphi 10.4.2 add support for Android 13

    As I said: if you used Android Studio to update your SDK/NDK -> you'll have an "incompatibility" if using "MANUAL UPDATES command-line" -> In this case, use "Android Studio" to avoid anything! the Android SDK/NDK can be in any drive or folder, not necessary in C:\Users\Public\ etc.... if using command-line "SDKManager.BAT" first, in your prompt command type this: set REPO_OS_OVERRIDE=windows --> to download only MSWindows O.S. <<Path root of your Android SDK>> = where is the SDK root, in my case it is in: D:\SDKsRAD\AndroidSDK sdkmanager.bat --sdk_root=<<Path root of your Android SDK>> --help -> >:_) sdkmanager.bat --sdk_root=<<Path root of your Android SDK>> --list_installed -> to see what packages is in your pc! sdkmanager.bat --sdk_root=<<Path root of your Android SDK>> --list -> to see what packages is in on Google to download! sdkmanager.bat --sdk_root=<<Path root of your Android SDK>> --update "package name" -> to update the package is in your pc! (download from Google) sdkmanager.bat --sdk_root=<<Path root of your Android SDK>> --install "package name" -> to install a new package in your pc! (download from Google) then, a sample in my case: sdkmanager.bat --sdk_root=D:\SDKsRAD\AndroidSDK --install "MyPackXYZ2023" "MyOtherPackABC2024" ... etc... You can download the last "command-line" tools from Android Studio official site, if you need! https://developer.android.com/studio
  25. programmerdelphi2k

    Any Demo On How To Use TBiometricAuth In Delphi

    it was that I said: deprecated!
×