Repository navigation
Create base class for EditLink and few most used implementations #1063
Description
Activity
I could do it but first I want to be sure changes will be applied
If they come in new, separate units I don't see why not. My concerns in #799 were mainly about a read/write
Data[]property in the base class. I will be happy to accpet a derivedTVirtualTreeGridcontrol and appropriate editors.- addedPull Requests InvitedThere are no current plans to address the issue, but we would be happy if someone supplies a PR.There are no current plans to address the issue, but we would be happy if someone supplies a PR.
on Sep 22, 2021 Well, I thought about extending/modifying VirtualTrees.EditLink.pas so that other links could inherit most of generic methods and implement just specific things
@Fr0sT-Brutal: That sounds good, a well designed base class for editors will be helpful.
Done.
Combobox/datetimepicker/etc editlinks are probably to come.
@joachimmarder I've inspected TStringEditLink.SetBounds but it contains too much black magic so I left it for now but I guess some of that code will be needed for classes with controls of other types. In the same time Advanced demo only has 2 lines for this.Is it really necessary to reset FStopping on exception in TStringEditLink.EndEdit?
Is it really necessary to reset FStopping on exception in TStringEditLink.EndEdit?
Sorry, I can't comment much on that, I never worked on that code after taking over the project. But it looks strange. I wonder which kind of exceptions are to be expected here? Catching untyped exceptions isn't best practice anyway, and the covered code block seems to be too large. Maybe in case
FEdit.Hide()fails, the edit process should not be considered as ended because the editor may still be visible.I would prefer to catch expected exceptions here only.
Thank you for the pull request, it is now merged, but without an extended code review.
I'm a little puzzled here too... FStopping looks like mechanism to avoid reentrance but I guess the tree itself won't let it happen.
Somewhat related to #799. Would be nice to have basic EditLink class to inherit from and few ready-to-use most used implementations (plain edit, combobox, mask edit, spin edit...).
I could do it but first I want to be sure changes will be applied