-
Content Count
82 -
Joined
-
Last visited
-
Days Won
1
havrlisan last won the day on September 20 2024
havrlisan had the most liked content!
Community Reputation
35 ExcellentTechnical Information
-
Delphi-Version
Delphi 12 Athens
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
rtti Redeclaring property in a child class
havrlisan replied to havrlisan's topic in RTL and Delphi Object Pascal
Should've searched at least a bit before asking this question.. Digging into TRttiType.GetProperties I found the method TRttiTypeHelper.GetObjectListInVisOrder, which does exactly what I'm asking here. Original question still stands, although knowing this is enough to handle my scenario. -
Is it possible to know if a property is redeclared in a class or skip the original property entirely (the redeclared property would overwrite the original property in the Rtti)? It's easier to explain through an example: TMyClass = class strict private FInt: Integer; public property Int: Integer read FInt write FInt; end; TMyChild = class(TMyClass) published [RandomAttr] property Int; end; The Rtti will return 2 properties for TMyChild class, even though both have the same name. I haven't found any data in the TRttiProperty that would indicate that the property is redeclared. Second question would be, if this is not possible: can I rely on the returned properties to be sorted by class inheritance? In other words, can I safely assume the returned array of properties would first contain properties of TMyChild, and then of TMyClass?
-
RAD Programmer Coding Challenge #1 - build a MineSweeper game in RAD Studio with a chance to with $500
havrlisan replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
I've seen a few people discussing their development and posting screenshots in the Skia4Delphi telegram group. -
What does [ref] attribute actually dows
havrlisan replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Only if you need to access the actual reference. -
What does [ref] attribute actually dows
havrlisan replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Dalija Prašnikar has a great article on what it's purpose is in FreeAndNil: https://dalijap.blogspot.com/2020/06/magic-behind-freeandnil.html -
I didn't realize you meant only the implementation. In that case, I'd use the plain simple line commenting: Delphi has that feature set to shortcut "Ctrl+/", where / character is on numpad. MMX has the feature "Toggle Comment Selection", which acts very similar. You can assign a custom shortcut to that one. GExperts also has a similar feature; not a toggle comment, but comment and uncomment. You can find it under "Editor Experts", and assign a custom shortcut as well.
-
Even that is possible with MMX, with the feature called "Comment member(s)..." in the "Text Tools" group. I know I manually set the shortcut of that one to "Alt+Shift+X". With that one, you can even edit the "TODO" comment that gets added, in MMX > Properties >Editing (Pascal group), and there you'll see the setting "Text to insert when commenting entity" in the last section, "Insert Text When Commenting".
-
If you're using MMX (which I highly recommend), you can use the "Delete Entity..." feature which deletes the current entity your caret is on: interface, class, property, method, field, etc. Not sure if it's the default shortcut, but mine is "Ctrl+Shift+Delete". For fun, here are my MMX usage statistics for features that have been used 1000+ times (Delete Entity is in top 3):
-
TSkSvg is originally from skia4delphi. Did you enable Skia already? You can do so by right-clicking the project in the Projects view and clicking on "Enable Skia". Sometimes that may not be enough, in which case you'll need to create a startup unit. Read more about it here: https://github.com/skia4delphi/skia4delphi?tab=readme-ov-file#enable-skia-render I failed to see you're talking about VCL, so disregard this message.
-
For starters, I recommend reading two FMX-related books: "Delphi GUI Programming with FireMonkey" by Andrea Magni, and "Fearless cross-platform development with Delphi" by David Cornelius. Together, they cover the most important parts of how FMX framework functions, and they both write about similarities and differences between VCL. I suggest you also play around and discover the RAD Studio Multi Device Samples, since they contain good chunks of code and UI components to see how to interact with FMX. If you have multiple devices with different platforms (Android, iOS, macOS), make sure you try the apps on all of them, to see how the deployment and functionality works across different platforms. As you start using FMX, I strongly recommend working with skia4delphi in every project. It is already integrated into FMX, but make sure to enable it in every project as it increases performance and provides you a ton of features that are missing in the stock FMX (such being Svg/Lottie support and right-to-left text). Good luck!
-
[BUG] Mouse wheel no longer scrolls when highlighting
havrlisan replied to Willicious's topic in Delphi IDE and APIs
You're right. I have the same behavior; I never noticed it before since I don't usually select code like that. That said, you should report it on the Quality Portal instead of here. -
I agree; most cross-platform apps nowadays have the same style across platforms. The FMX's approach to style objects with the png is rather stale as well; one should turn to using vector images. This is possible with zx-skiacomponents, which approaches the StyleObjects differently, allowing you to use direct properties for changing colors, animated images, or text settings on triggers. The feature I used the most was the SVG override color change, it allows you to create a beautiful yet responsive UI with no pixelization to worry about.
-
Have you installed the gtk library on the linux machine? sudo apt-get install libgtk-3-dev
-
You've got a typo: it's not System.TypeInfo, it's System.TypInfo.
-
PAServer Linux (WSL2) Delphi 12.2 does not output to console
havrlisan replied to Patrick vd P.'s topic in Cross-platform
That's a good question, I didn't have that case yet so haven't thought about it. Perhaps install the desktop environment and see if the app console will display itself? I never tested Console apps on other platforms, so can't help much in that area.