-
Content Count
86 -
Joined
-
Last visited
-
Days Won
1
Posts posted by havrlisan
-
-
-
I understand the reason behind your decision to implement this, but on the other hand, Delphi Promises was published not long ago, which seems very similar to this project. Does it not contain the same functionality, or does it differ in any way?
-
I also get this behavior pretty often. I have MMX, GExperts and CnPack, although I disabled all the editor and debugger features for the latter two. Pretty random occurrence though, haven't noticed a pattern that would reproduce it.
-
2 minutes ago, havrlisan said: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?
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?
-
45 minutes ago, Patrick PREMARTIN said:Nobody contacted you for this little contest ? 😞
I've seen a few people discussing their development and posting screenshots in the Skia4Delphi telegram group.
-
1
-
-
16 minutes ago, Tommi Prami said:I was jsut thinkin that could there be places and code (in my code ba se for example) thjat could benefit from [ref]?
Only if you need to access the actual reference.
-
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
-
1
-
-
Just now, Ian Branch said:Tks. Close ,but not quite.
If I comment a method with it, it also comments the declaration in the class. 😞
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.
-
1 minute ago, Ian Branch said:Sometimes I just want to select the method and comment it out while I try an alternative version of the method.
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-renderI 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!
-
4
-
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.
-
1
-
-
36 minutes ago, Serge_G said:For dark and light theme, I vote for "universal" (non OS specific styles) like light.style and dark.style (no png inside so no TxxxStyleObjects and overall lightweight)
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.
-
2
-
-
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.
-
22 minutes ago, Patrick vd P. said:Okay, I thought I have seen (probably very old) videos of output in the console (indeed the one running PAServer).
But if that is not going to work, how will I be able to debug console applications which require input from the user?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.
-
Not sure I understand your question. Do you expect the output in the console in which you ran the PAServer? If so, that's not going to happen, because PAServer only acts as an intermediary for building and debugging the app on that platform, not outputting app logs (except for exceptions, at least to my knowledge). However, Writeln will output to the IDE Messages panel if running with a debugger, and that was always enough for me.
-
If you're using a Delphi version 10.3 or newer, you can also achieve this by declaring an inline variable:
var LEnum := ssShift;
-
10 minutes ago, limelect said:I tried some projects to compile with D10.2.3 and all had errors
all kind so I gave up.
Only your about component compiled OK
P.S no FMX.fhtmledit
I'll never understand people like you. Every project except CScript has a Requirements section where he mentions that Delphi 12.2+ is supported, or at least that it is made and tested with Delphi 12.2. You really should RTFM more often.
-
1
-
1
-
-
Version: Beta 15.1.12.2636
Is it just me, or is the source indexer no longer rebuilding automatically after the IDE opens? This is my configuration:
According to the hint:
I have the source indexer window stored in the bottom panel along with messages, which is hidden until invoked. Am I missing something? This worked in a previous version.
As always, thanks for your hard work!
-
12 minutes ago, Dmitry Onoshko said:type TCustomContainer<T: TCustomItem> = class abstract public type TCustomItem = class protected FContainer: TCustomContainer<T>; end; protected FItems: TArray<T>; ... procedure HandleItemNotification(AItem: T); end;
But then, when I call
procedure TCustomContainer<T>.TCustomItem.SomeMethod; begin ... FContainer.HandleItemNotification(Self); ,,, end;
inside TCustomItem method, I get “Incompatible types: T and UnitName.TCustomContainer<T>.TCustomItem”.
It is not possible to define TCustomContainer<T: TCustomItem> if TCustomItem is its internal public type. This only compiles (up to your error) because there is another TCustomItem defined outside that class.
Doing this with classes only is impossible. You cannot have both a T that is a TCustomItem within TCustomContainer<T> and a FContainer that is a TCustomContainer<T> within TCustomItem. The relation cannot be bi-directional in this scenario. A closer implementation to what you're trying to achieve is possible with interfaces, but that comes with its own set of issues. This post has an example of what you're trying to achieve with interfaces:
Also, IMO it is not a good idea to couple your classes like you're trying to do here. A TCustomItem should not directly call the TCustomContainer's HandleItemNotification; you should handle that either via an observer pattern or with events.
-
1
-
-
4 hours ago, Jud said:I installed this patch yesterday, and I'm having a lot of problems. Is anyone else having them?
Problems include failing to terminate a program in the IDE, access violations, Find Declaration quits working, etc.
I installed the version as soon as it came out and had no issues like these you speak of. I see you wrote "patch", did you maybe install it only from GetIt, or did you do a complete reinstall of the RAD studio? For reference, here's the explanation from Embarcadero on how to install it: https://blogs.embarcadero.com/rad-studio-12-2-athens-inline-patch-1-available/
Delphi 13 beta
in Delphi IDE and APIs
Posted
In his defense, now I'm hyped for the release