compnerd/swift-win32

Many classes cannot be overwritten

tomaszpieczykolan opened this issue · 1 comments

First of all, thank you for making this project! I think it's awesome that we are getting closer to being able to write proper Windows apps in Swift.

I was playing around with this framework and I noticed that I wasn't able to override the ViewController class. I can see that it is marked as public and not open. Is this intentional? Many other classes are also public.

Thanks!

Thank you :)

Yes, the classes are currently intentionally marked as public. The only thing that would be preventative for changing classes to open is that they need to be audited and fixed up. Ideally, that would also be a good time to add some test cases (which currently are sorely lacking). When the class is marked as open, methods and properties should also be properly be converted to open from public.

If you want to take on the work to audit and adjust the classes which you need, that seems like a perfectly reasonable thing (although, that is not a please only do it for the classes you need, you are welcome to audit the entire surface area if you are motivated ;-)). PRs for that would be great, though I would ask that you keep a single PR focused to a single class - we can always work through a list of them.