-
Content Count
71 -
Joined
-
Last visited
Community Reputation
2 NeutralTechnical Information
-
Delphi-Version
Delphi 12 Athens
Recent Profile Visitors
1189 profile views
-
Simulate Multiple Inheritance
Mike Warren replied to Mike Warren's topic in RTL and Delphi Object Pascal
Thank you all for your replies. I'll experiment with the example darnocian suppled. -
Simulate Multiple Inheritance
Mike Warren replied to Mike Warren's topic in RTL and Delphi Object Pascal
I tried it like this, which shows I don't understand interfaces properly: IapShape = interface procedure SetThing(AThing: Boolean); property Thing: Boolean read FThing write SetThing; // Error here: Field or method identifier expected end; TapRectangle = class(TRectangle, IapShape) private FThing: Boolean; procedure SetThing(AThing: Boolean); public property Thing: Boolean read FThing write SetThing; end; -
I don't exactly need multiple inheritance (I think), but I'm trying to find a clean way of doing the following (This is simplified): This is in FireMonkey, if that makes a difference. I have 2 classes; TapRectangle, inherited from TRectangle, and TapCircle, inherited from TCircle. I want to retain all the properties and methods of the ancestor classes, but I want to add some new methods and properties, which are the same for both TapRectangle and TapCircle, so I can't inherit from TShape. I also want to be able to pass a TapRectangle or TapCircle to a function and access these new properties and methods. Is there an elegant way of doing all this? I can achieve what I want by copying the new properties and methods to each new class and the using the common ancestor TShape to pass my components, but it's not elegant. I've actually never used interfaces, but from what I understand that wouldn't work here. Please correct me if I'm wrong.
-
Many years ago I wrote a small D7 program for logging from applications I was developing. This used WMCopyData and a few other Windows APIs and it was really robust. I used it for many projects. It was great in that it could keep logs right up to the point of failure with almost no impact on the performance of the main program. The problem I have now is that I want to do the same thing for multi-device applications in FMX. My initial thought is to make it a network application, but I'm wondering if there's a better method I don't know about. Does anyone have any suggestions? Also, I haven't done any network applications for many years. Is Indy still the go-to for network coms that's reliable and lightweight?
-
Is the version of Fast Reports FMX supposed to be able to export PDFs? When I right-click on the preview window the popup menu has "Export" and "Export PDF", but neither of these do anything at all. I also notice the VCL version doesn't have these export options in the pop-up, which makes me suspect the menu items were accidentally left in the FMX version.
-
Getit Fails to Install Fast Reports D12.1
Mike Warren replied to Mike Warren's topic in Delphi IDE and APIs
Installing Tee Chart did the trick. Thanks Tom. -
When I try to install Fast Reports in Delphi 12.1 Pro it fails as shown in the screenshot. Does anyone know how I can solve this?
-
Actually, that StackOverflow thread looks like it might contain the answer in the second reply. Overriding the CanShow method seems to stop the flash. function TForm1.CanShow: Boolean; begin Result := not Timer1.Enabled; end; procedure TForm1.Timer1Timer(Sender: TObject); begin Timer1.Enabled := False; Left := 500; Top := 200; Visible := True; end;
-
Thanks for the reply, Nigel. Unfortunately, the form flashes up briefly at the default position and size before being hidden. Below is something I just thought of. It seems to work fine on Windows. I'm not able to test on Mac at the moment. unit Unit1; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs; type TForm1 = class(TForm) Timer1: TTimer; procedure FormCreate(Sender: TObject); procedure Timer1Timer(Sender: TObject); private StartLeft: Integer; public { Public declarations } end; var Form1: TForm1; implementation {$R *.fmx} procedure TForm1.FormCreate(Sender: TObject); begin StartLeft := Left; Left := MaxInt; Timer1.Interval := 4000; Timer1.Enabled := True; end; procedure TForm1.Timer1Timer(Sender: TObject); begin Timer1.Enabled := False; Left := StartLeft; end; end.
-
In the past all I needed to do was add Application.ShowMainForm := False, but FMX does not have ShowMainForm. Setting the main form's Visible property to False, either at design time, or in Form.Create does nothing, and adding MyForm.Visible := False to the application anywhere before Application.Run causes an A/V. I need this to work on Windows and Mac, so a WinAPI solution is not suitable. Does anyone have a suggestion?
-
I just tried a FMX NumberBox in D11.3 and D12 and find it a complete mess. Nothing about the operation is intuitive. In addition to your observation, if I try to highlight the text by clicking and dragging, any vertical mouse movement at all changes the value wildly. Ctrl+A does not work for me. Personally, I'd do my own thing and forget TNumberBox completely.
-
Offline Installer - GetIt doesn't work with msg JSON metadata not found ?
Mike Warren replied to Lars Fosdal's topic in Delphi IDE and APIs
That's what I used the first time where everything got messed up. I skipped it on the second installation and in the small amount of testing I've done the installation seems to have worked fine. -
Offline Installer - GetIt doesn't work with msg JSON metadata not found ?
Mike Warren replied to Lars Fosdal's topic in Delphi IDE and APIs
Installing D12 was "fun" for me. I made the stupid mistake of trying to import settings from V11.3 and got dozens of errors during the install and each time I ran it. Tried uninstalling, and that took ages before finally locking up. Tried the uninstaller again, and got told it couldn't uninstall without telling me why. Fortunately, I run Delphi in a VM, so I just created a new duplicate of my working dev VM and installed it from there. Don't really understand why the "offline" installer spent most of its time downloading things, but finally it completed. One of the bugs that was causing me problems is fixed. Another has supposedly been fixed, but has not, and within the first 10 minutes I found a couple of new bugs. I'm looking forward to the first maintenance release. -
This issue is mostly fixed in D12. Only tested on Windows so far. Accelerator keys work in TMainMenu and on TButton.Text without causing a Windows beep. Shortcuts using Alt+<letter> do not work in menus, but they do work in actions. Alt + the first letter of a root main menu item will open that menu and then the first letter of each sub-menu item will highlight it, but not select it. So even though this is not exactly the behaviour in VCL, at least it's workable.
-
It doesn't appear to be fixed to me.