Leaderboard
Popular Content
Showing content with the highest reputation on 12/23/24 in all areas
-
Some Delphi IDE versions have an annoying bug with the toolbars that makes them unusable if you customize them. If you have seen this problem, you know it, if not, congratulations! Unfortunately I am one of the people who experience this problem and it annoyed me so much, that I added a workaround to GExperts. ... read on in the blog post.
-
Anybody have Delphi running in a VM on M-series Mac?
Brandon Staggs replied to David Schwartz's topic in General Help
Your VM does not have the correct operating system installed on it for that to work. It's the responsibility of the installed Windows OS on the VM to translate x86/x64 code to ARM instructions. Your version of Windows won't do that. -
Anybody have Delphi running in a VM on M-series Mac?
Rollo62 replied to David Schwartz's topic in General Help
I'm afraid a "move" from older to newer is not possible, but I also would always recommend a new, fresh VM anyway, even if it would be possible, to ensure the always best performance on a new platform. Since the setup of such new machines always may take up to one week, until a setup is fully configured on all platforms, I usually proceed a strict checklist for that. There is a 2 year old post from Germany, about running Delphi on Apple Silicon, maybe that's helpful too ( should be able to be auto-translated ). https://www.youtube.com/watch?v=vc2mLROXWcQ -
I would rather say that are 21 seconds (which is probably less than I actually need to just read the description). This is backed by this quote from the About text: Since the start time of each puzzle is way out of my awake periods a day, I can thankfully ignore the ranking system completely. This allows me to concentrate on finding a suitable solution, sometimes even a clever one.
-
Anybody have Delphi running in a VM on M-series Mac?
Patrick PREMARTIN replied to David Schwartz's topic in General Help
the virtualisation software don't convert x64 to ARM code on a Mx Mac you need to use Windows ARM you can't move an x64 VM to an ARM computer, neither on PC nor Mac on the other hand, everything can be installed without any problem, as long as there's no need for a specific driver that hasn't been ported to ARM. -
Anybody have Delphi running in a VM on M-series Mac?
Dave Nottage replied to David Schwartz's topic in General Help
I can imagine that is the case. From (my sketchy) memory, I think I did investigate moving from an older VM, but in the end I started a new one. I tend to have as little installed on the VM as possible, so it wasn't difficult to bring one "up to speed" I have a Macbook Pro with an M1 Max, running a Windows 11 Arm VM (one with Delphi 12.2 and one with Delphi 11.3) using Parallels 20.1.1 -
Folder ReadOnly, Hidden, Normal
Remy Lebeau replied to Henry Olive's topic in RTL and Delphi Object Pascal
Nothing. ReadOnly has no meaning for a folder and is ignored. This is documented behavior: https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-setfileattributesw Making a folder read-only is an illusion. When you do it in Explorer, it iterates the folder's files and updates them accordingly. You can't change the attribute on the folder itself. Doing so is reserved by Windows for its private use on system folders. You cannot view or change the Read-only or the System attributes of folders in Windows Server 2003, in Windows XP, in Windows Vista or in Windows 7 -
Case: Please Explain Why Inline Variable Prevents Compilation
Remy Lebeau replied to rgdawson's topic in RTL and Delphi Object Pascal
Show off 😉 Thanks, I have added it to the bug report. -
Case: Please Explain Why Inline Variable Prevents Compilation
Stefan Glienke replied to rgdawson's topic in RTL and Delphi Object Pascal
Most simple case to repro to compiler error: procedure X(i: Integer); begin end; procedure Y; begin var f: TFunc<Integer>; X(f); end; -
Case: Please Explain Why Inline Variable Prevents Compilation
Remy Lebeau replied to rgdawson's topic in RTL and Delphi Object Pascal
I can reproduce the problem in a simple example that doesn't involve Spring4D (however, I get an "E2010 Incompatible types" error instead of an E2250) : type IShared<T> = reference to function: T; Shared = class class function Make<T: class>(AObj: T): IShared<T>; end; TSharedImpl<T: class> = class(TInterfacedObject, IShared<T>) FObj: T; constructor Create(AObj: T); destructor Destroy; override; function Invoke: T; end; TTest = class end; TTester = class procedure DoTest(AObj: TTest); end; class function Shared.Make<T>(AObj: T): IShared<T>; begin Result := TSharedImpl<T>.Create(AObj) as IShared<T>; end; constructor TSharedImpl<T>.Create(AObj: T); begin inherited Create; FObj := AObj; end; destructor TSharedImpl<T>.Destroy; begin FObj.Free; inherited Destroy; end; function TSharedImpl<T>.Invoke: T; begin Result := FObj; end; procedure TTester.DoTest(AObj: TTest); begin //... end; procedure Foo1; var Tester : IShared<TTester>; TestObj : IShared<TTest>; begin Tester := Shared.Make(TTester.Create); TestObj := Shared.Make(TTest.Create); Tester.DoTest(TestObj); // <-- Compiles OK! end; procedure Foo2; begin var Tester: IShared<TTester>; var TestObj: IShared<TTest>; Tester := Shared.Make(TTester.Create); TestObj := Shared.Make(TTest.Create); Tester.DoTest(TestObj); // <-- E2010 Incompatible types: 'TTest' and 'IShared<TTest>' Tester.DoTest(TestObj()); // <-- Compiles OK! end; I have now reported this issue to Embarcadero: RSS-2613: Anonymous Method is called differently depending on whether it is declared as an Inline Variable or not -
How to solve System Out of Resources in TScrollBox
ToddFrankson replied to araujoarthur's topic in VCL
I use an In memory table (TFDMemtable) for somethings I am working on, assigning only the records that will be visible on the screen at any given time. So if I will see 20 -30 items, I reuse the controls, just change the data in them as someone "scrolls" . It's an illusion, but visually it seems extremely fast, and low memory overhead due to only a set number of visual components -
How to solve System Out of Resources in TScrollBox
Remy Lebeau replied to araujoarthur's topic in VCL
For my custom log viewer, I used a standard TListView in virtual mode with owner-drawn items, and it handles millions of items (GB-sized log files) just fine with low overhead. The hardest part was implementing a caching mechanism for the on-screen items, as I also filter and search items so don't want to keep the whole file in memory at one time. -
How to solve System Out of Resources in TScrollBox
Dmitry Arefiev replied to araujoarthur's topic in VCL
... or TControlList -
How to solve System Out of Resources in TScrollBox
Vincent Parrett replied to araujoarthur's topic in VCL
Using a TScrollbox with thousands of child controls is a terrible idea, apart from the memory overhead the performance would not be greate. As others have said, using a virtual list control is much better solution. This is what I use for these scenarios - you do have to wite the paint code yourself but it's very lightweight https://github.com/VSoftTechnologies/VSoft.VirtualListView - supports XE2 - D12 and vcl themes - although I have only tested themes within an IDE plugin There is a demo app and you can also see it in use here https://github.com/DelphiPackageManager/DPM/blob/master/Source/IDE/EditorView/DPM.IDE.EditorViewFrame.pas -
How to solve System Out of Resources in TScrollBox
stijnsanders replied to araujoarthur's topic in VCL
If you have a potentially really long list, and you create components in memory (and with GUI elements), but only have a few of them at once on screen, that's a lot of wasted resources, so the 'out of resources' error you get may be actually correct. If I recall correctly, what things like VirtualTreeList do, and you can do this yourself with TListView by switching property Style to dlOwnerDrawFixed or lbOwnerDrawVariable and using the OnDrawItem event, is actually just draw the information of the items when they are on screen. By setting the numer of items, the scrollbars show as if there are that many items, but it is in fact a kind of illusion. I wish I had a nice example to show you, but I only have this one I once wrote for a complete code-comparing tool. I hope you can find more examples if you look for them on the net. -
Oh well, provides a nice warm up phase before coding 🌞