Skip to content
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

CompositeControl: ambiguous GetContents error message, test inheritance #1715

Merged
merged 1 commit into from
Oct 22, 2023

Conversation

exyi
Copy link
Member

@exyi exyi commented Oct 18, 2023

According to #1613 CompositeControl do not work with both base and derived types defining GetContents method. I could not replicate that, the provided example works for me, maybe it was fixed accidentally.

  • I added test for that
  • In any case, multiple GetContents overloads were handled poorly, I added better error for this case.

In the issue, I mentioned that it would be complex to handle potential redefinition or "removal" of properties in the derived type. That isn't really the case, both cases don't need any special code

  • The "removal" - omission of an property in the derived type is simply ignored. I think that it's quite intuitive that properties can't disappear in derived types, if the GetContents doesn't ask for it it won't get it.
  • Redefinition is already handled reasonably, since we can already try to redefine IncludeInPage or some capability property.

Resolves #1613

…inheritance

According to  #1613 CompositeControl do not work with
both base and derived types defining GetContents method.
I could not replicate that, the provided example works for me,
maybe it was fixed accidentaly.

* I added test for that
* In any case, multiple GetContents overloads were handled poorly,
   I added better error for this case.

In the issue, I mentioned that it would be complex to handle
potential redefinition or "removal" of properties in the derived type.
That isn't really the case, both cases don't need any special code
* The "removal" - omission of an property in the derived type is simply ignored.
   I think that it's quite intuitive that properties can't disapear in
   derived types, if the GetContents doesn't ask for it it won't get it.
* Redefinition is already handled reasonably, since we can already
   try to redefine IncludeInPage or some capability property.

Resolves #1613
@exyi exyi force-pushed the compositecontrol-inheritance-handling branch from 1e972a4 to f21c2cf Compare October 18, 2023 19:09
@tomasherceg tomasherceg merged commit 585f522 into main Oct 22, 2023
14 checks passed
@tomasherceg tomasherceg deleted the compositecontrol-inheritance-handling branch October 22, 2023 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CompositeControl inheritance
2 participants