Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 02/26/24 in Posts

  1. Uwe Raabe

    What new features would you like to see in Delphi 13?

    Actually there is a way to achieve that using generics: type TRecB<T> = record FieldA: T; FieldB: Integer; FieldC: string; end; type TRecA = record Secret: string; end; type TRecB = TRecB<TRecA>;
  2. Fred Ahrens

    Hyper-V server as host for 3 VMS

    +1 for Proxmox. For a very long time I had the impression, it's an "enthusiasts platform for virtualization". One of our customers "forced" us to test our software under Proxmox and 1 month later most of our bare metal machines and VMs were migrated to Proxmox VMs and containers. Couldn't be happier too.
  3. David Heffernan

    Don't use Application.MessageBox

    Reporting error dialogs from thread pool threads sounds terrible. Stop doing it at all and then you don't need to think that one message box function is better than any other.
  4. dummzeuch

    GExperts 1.3.24 Beta1 for Delphi 12

    I have just built an installer for GExperts 1.3.24 Beta1 for Delphi 12. Note the word “Beta” in the release name! We are one step up from Alpha, there are still many bugs, but overall it seems to be stable. Most of the bugs manifest themselves as display glitches on high DPI monitors. Continue reading in the blog post
  5. David Heffernan

    What new features would you like to see in Delphi 13?

    This isn't really a great example. The sort of thing that I want to do with records, but cannot, is this: type A = record; B = record; A = record function foo: B; end; B = record function bar: A; end; I can get round this using helpers right now, but I don't understand why I can't do this directly as above.
  6. David Heffernan

    Don't use Application.MessageBox

    If you are debugging then throwing an exception is the way to do it. Then the debugger freezes all threads. You surely don't want the other threads to continue running at this point.
  7. JonRobertson

    TPngImage help needed for vague docs

    Once you add pngimage to the uses clause of any unit, the TPNGImage class is registered with TPicture, which enables your application to load and save PNG images. This is done in the initialization section of pngimage.pas (TPicture.RegisterFileFormat('PNG', 'Portable Network Graphics', TPngImage);). This provides PNG support to any class that uses TPicture to load or save impages, for example: TImage.Picture.LoadFromFile. If you want more control over the image itself, then declare and use an instance of TPNGImage and the provided methods and properties to load, save, or modify the PNG image as desired.
  8. Thanks.. I've updated the readme now.
  9. Sorry, I don't have any examples to give you, as I don't write code for Android.
  10. I apologize, I had only paid attention to this part.
  11. Vincent Parrett

    Hyper-V server as host for 3 VMS

    Be aware that code signing dongles do not allow access via remote desktop. We use VirtualHere over a vpn - our dongle is on a machine 300Km from the data center where are build machines are hosted (on proxmox) - it works really well - the only issue we have is that we can only do the code signing from one virtual machine (we have a bunch of Continua CI build agent vm's).
  12. Vincent Parrett

    Hyper-V server as host for 3 VMS

    You know Hyper-V server has been discontinued right? If you are going to use this machine for directly (rather than only remote desktop into the vm's) then just install windows 11 and use the hyper-v feature. If you are going to remote into the vms from another machine for your daily work then use something like proxmox ve (also free).
  13. Fred Ahrens

    Hyper-V server as host for 3 VMS

    For using the code signing dongles (or any other USB device) I recommend VirtualHere. Install the VirtualHere server in the host machine and your USB dongles/devices connected to the host can be accessed via a simple client within your VMs. It's not free but not expensive and just works. Meanwhile we switched from Hyper-V to Proxmox as it has built-in USB-pass-through and other features missing in Hyper-V. But main reason was: there is actually no longer a free stand-alone Hyper-V server as it got discontinued by Microsoft.
  14. Lars Fosdal

    Hyper-V server as host for 3 VMS

    I got a Lenovo P16 (i7)64Gb/ 1TB+500GB Workstation Laptop, and run "corporate" Windows 10 latest patches on the WS and Win11 Pro on a Hyper-V VM. This machine is my regular work machine and it runs an SQL Server instance on the primary OS as well. I also have a private MacBook Pro M1 16" with 32GB and 2TB, running Parallels and Win 11 for ARM on a VM, and RHEL on a VM. Delphi installs and runs just fine on both Win 11 VMs. Interestingly, the MBP is faster than the P16 for the VMs, staying cool and silent, while the P16 spins up the fans like a turbine. I haven't tried dongles on my VMs, since signing happens on the corporate build server, but both VM hosts can pass through USB ports, so I would expect it to work.
  15. Darian Miller

    Embarcadero Sample Debugger Visualizers

    There is source in the Visualizers folder: Embarcadero\Studio\23.0\source\Visualizers It doesn't include the .dpk though.
  16. Brian Evans

    Hyper-V server as host for 3 VMS

    Windows 11 Pro and higher support running Hyper-V as an optional feature. I use a workstation running Windows 11 Pro as my main environment with WSL, Windows Sandbox, and some Hyper-V virtual machines for various other development, and testing tasks that require different/clean environments. Current machine is a P620 from Lenovo with a 16 core Threadripper PRO 3955WX with 128GB RAM using SSDs + Optane 905P for storage (the latter configured as a Dev Drive using ReFS) and a Radeon PRO W6400 graphics card. Newegg been slowly clearing out Optane 905P drives for much less than they used to go for, so I bought one, not sure if it has made much of a difference.
  17. Uwe Raabe

    What new features would you like to see in Delphi 13?

    You have already been told:
  18. Vandrovnik

    What new features would you like to see in Delphi 13?

    In forward declaration of a class, compiler immediatelly knows the size of that type. For records, their size would be unknown in forward declaration.
  19. Dave Nottage

    System menu Item on macOS

    Example code for how to do it: uses Macapi.AppKit, Macapi.Helpers; procedure TForm1.Button1Click(Sender: TObject); var LMenu: NSMenu; LIndex: Integer; begin LMenu := TNSApplication.Wrap(TNSApplication.OCClass.sharedApplication).mainMenu; LIndex := LMenu.indexOfItemWithTitle(StrToNSStr('Window')); if LIndex > -1 then LMenu.itemAtIndex(LIndex).setHidden(True); end;
  20. You did not show the code that receives the file path from the file chooser and puts it into the TEdit, or show what the file path actually looks like. But ACTION_GET_CONTENT is documented as returning a "content:" uri, which requires you to use the ContentResolver class to access the file data. But TIdMultipartFormDataStream.AddFile() uses TFileStream, which wants direct access to the file, which will not work with a "content:" uri on modern Android versions. So you will likely have to either: access the file yourself via Android APIs and read its byte data into a TMemoryStream or TByteStream, or create a custom TStream that wraps an Android InputStream from the ContentResolver.openInputStream() method And then use TIdMultipartFormDataStream.AddFormField() instead of TIdMultipartFormDataStream.AddFile() to send whichever TStream you end up using. Alternatively, you can use ContentResolver to extract the underlying "file:" uri from a "content:" uri, and then you should be able to open the file using a normal TFileStream (provided you have permissions to the file). Also, when using ACTION_GET_CONTENT, the ACTION_GET_CONTENT documentation says to wrap your Intent with Intent.createChooser(), and also include CATEGORY_OPENABLE and FLAG_GRANT_READ_URI_PERMISSION on your Intent.
  21. Brandon Staggs

    What new features would you like to see in Delphi 13?

    I am inclined to give some latitude to the devs on dfm dpi issues because they are fighting a very legacy system that goes back to the 80s. Multi-dpi support in Windows is problematic because of the base Win32 api. It's not like Mac where they chucked everything and went to floating point values, which is the real solution, but has the downside of throwing out billions of dollars worth of working code. (On Windows I mean. On Mac, since hardly anybody used it to do real work, it was no big deal to do it in the 90s.) Anyway, doesn't the "Low DPI" setting for the form designer solve the dfm issue? True, it means editing the form is scaled by the OS, but the rest of the IDE should be in the correct DPI. Am I wrong about this?
  22. Remy Lebeau

    Lookup for "localhost" takes 2 seconds

    If you were using Indy's TIdHTTP, then it would automatically use IPv4 unless the requested URL is bracketed, eg: "http://[HostOrIPv6Address]/", which would force IPv6. For the RTL's THTTPClient, I have no idea how it behaves in regards to IPv4/IPv6.
  23. David Champion

    New proyect in Delfos

    If you are a beginner, as you say, you'd best select the simplest of choices available and extend from there. I would suggest registering for a AWS account 12 months free tier and using Aurora PostgreSQL. Just a 2 tier solution, Delphi and a cloud based database. No need to spin up a server instance. If the version of Delphi doesn't support remote databases then look into a trial version of DevArts's UniDac components.
  24. Rollo62

    How to design QR Scan focus screen with FMX

    That looks OK for me, I would do the same. What I meant was using the TPath, with a punched-out center hole and using its Bitmap fill property with effects. I just clicked a roughly demo together, only tested under Win32, see enclosed. This is just as proof of concept, it seems to work well, but needs some refinements of course. This would allow to use any masked path, but of course requires a bitmap copy right now. T418_ImgHole_001.zip
×