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

Replace AddClassType->TryAddClassType #92

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

etkramer
Copy link
Contributor

@etkramer etkramer commented Nov 3, 2024

To override a built-in class type with their own, a user has to call AddClassType() manually. Unfortunately, this causes InitializePackage() to fail when used with InitFlags.RegisterClasses. An option is to simply not pass RegisterClasses, but this way all other class types are still registered automatically

@EliotVU
Copy link
Owner

EliotVU commented Nov 4, 2024

Good catch, but is there any good reason to override a particular class, as opposed to updating the existing classes instead?

@EliotVU
Copy link
Owner

EliotVU commented Nov 4, 2024

I made a few changes, instead it will always override the class type, but this has to performed after the call to InitializePackage() Thoughts?

@EliotVU EliotVU added this to the 1.8.0 milestone Nov 5, 2024
@EliotVU EliotVU merged commit 3eab0cb into EliotVU:master Nov 5, 2024
@etkramer etkramer deleted the optional-custom-class branch January 28, 2025 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants