-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: Please remove "sealed" from KryptonWrapLabel
and KryptonLinkWrapLabel
#1023
Comments
Thanks for bringing this to our attention. I'll have a look into it as it might be an edit done by ReSharper. Will update you when it's ready for testing. |
KryptonWrapLabel
and KryptonLinkWrapLabel
Please try this feature in build >= .156 |
Closing in 30 days (06/07/2023) if no response is recorded. |
I tried to test the changes you made for this request, but unfortunately version 80.23.6.156-alpha is not compatible with original Krypton Toolkit coming from ComponentFactory/Phil Wright anymore. |
In the upcoming v80 version, both Edit: Sorry, wrong link, here is the correct one |
I replaced all occurrences of KryptonPalette with KryptonCustomPaletteBase and all occurrences of IPalette with PaletteBase as mentioned in the documentation link provided. Here's the code we use to import a palette XML-file that is embedded in the resources of the assembly:
Here's the stack trace of the NullReferenceException: |
Would it be possible to put together a sample project to figure out what's going on? |
Sample project attached :) Meanwhile I surrounded the call of method "Import" with try-catch-block, but now I will get another NullReferenceException (next one comes from parameterless constructor of class NavigatorPage). I download the code of branch "alpha" and maybe I found the problem for all of the errors I will get. The event invokation methods (like OnPalettePaint in class PaletteBase or OnTabStopChanged in class NavigatorPage) are not checking if the event is null:
It would be better to introduce NULL checking here like
|
Thanks for raising the null checking issue, will fix today :) |
Please could you try again using build >= .170? |
The "Import" method of class KryptonCustomPaletteBase still crashing with NullReferenceException (now in method "OnButtonSpecChanged" of class "PaletteBase"): Here's the stack trace of NullRefrenceException: bei Krypton.Toolkit.PaletteBase.OnButtonSpecChanged(Object sender, EventArgs e) I donwloaded the code of current alpha branch and I see that you implemented null ckecking for event invokation of event "PalettePaint". But even in class PaletteBase there are four other events (AllowFormChromeChanged, BasePaletteChanged, BaseRendererChanged and ButtonSpecChanged) where still is no null checking on invoking those events. I think you have to check "all" events/invokation methods in "all" classes to ensure a proper null checking (seems to be a lot of work). The Standard-Toolkit" project is supported by JetBrains (don't know which product is used). With ReSharper (is used in our company) you can mark the event declarations with "CanBeNullAttribute" (from JetBrains.Annotations) and let ReSharper check for "Possible NullReferenceException". |
Done, I'll let ReSharper have a look |
|
Please can you confirm that this is working in the latest canary build? |
We are still using the original Krypton Toolkit coming from ComponentFactory/Phil Wright.
Because the original version written by Phil Wright has limitations and is not maintained anymore we plan to upgrade to Krypton-Suite/Standard-Toolkit.
Unfortunately we found one incompatibility to the original version, so we are not able to upgrade:
The control "KryptonWrapLabel" is implemented "sealed" in your version of Krypton ToolKit, so we can not inherit from this control (but we do).
Is there any need for sealing the class/control "KryptonWrapLabel"?
The text was updated successfully, but these errors were encountered: