swift-cross-ui icon indicating copy to clipboard operation
swift-cross-ui copied to clipboard

WinUIBackend: Store callbacks in subclasses instead of global hashmaps

Open stackotter opened this issue 6 months ago • 0 comments

At the moment, WinUIBackend stores callbacks such as button click handlers in backend-wide hashmaps (keyed by object identifiers). This should be replaced with the technique that all other backends use; i.e. subclassing backend widgets to add stored callback properties.

I've been putting this refactor off for a while because my Windows development machine used to take 45 minutes to clean build WinUIBackend, and refactoring would've required multiple clean builds, because changes that caused the backend class to get resized were causing crashes for some incremental building related reason. My new desktop can clean build WinUIBackend in 10 minutes so I don't have any excuses anymore.

stackotter avatar Jun 23 '25 05:06 stackotter