Add a knob to specify a class for window creation.#90
Add a knob to specify a class for window creation.#90vseguip wants to merge 1 commit intoryanmcgrath:trunkfrom
Conversation
|
Hmmm, any reason to not just implement support for e.g (Is there a list of things cacao's missing here?) |
|
Two main reasons:
|
This is something I'm fine with, personally. cacao is meant to be "a Cocoa-ish API, but in Rust" - I'm not sure most people care enough about the distinction between the window/delegate/etc.
This is a very good question and I've unfortunately been up for 24 hours now, so will need to mull it over after some sleep.
I'm less interested in the flexibility and more interested in "can users who read the Rust/cacao docs immediately see what possibilities are there" without needing to go and learn all of Cocoa itself. If people have to drop to doing their own subclasses for specific bits of Cocoa functionality, then they may as well use That all said, I'm not necessarily against this PR - that is to say, merging it since it does give an interesting lower level hook strategy, but also simultaneously looking at improving the Cocoa hooks that cacao offers. I'll sleep on it and see what I land on - either way the effort's appreciated! |
|
For reference, in I think the better solution for |
Fair point, although I think there is value in consistency with Cocoa, at least in my experience (which is admmitedly not much when it comes to MacOS development) when I have to search for how to do things I will usually find the Cocoa version then adapt it to Rust.
Any conclusion here on what would be the best default implementation?
Having both implementations sounds good to me too :) |
I've not had time to sit down and figure out what the exact API should look like, but I do want to try and find time this week for it - work's just been insane lately. :( |
This is useful to allow overriding some behaviours that are not sent to WindowsDelegate (for example canBecomeKey, etc). Will default to NSWindow so it will be a noop for existing code.
|
I've updated the PR with a fix for the formatting issue. |
|
Friendly ping :) |
|
Appreciate the ping, unfortunately I'm juggling a lot at the moment so this might sit for a bit longer - and I want to get ahead and merge @madsmtm I'll leave it open tho since I'm still interested on whether there's something to bring in here, definitely still open for discussion. |
This is useful to allow overriding some behaviours that are not sent to WindowsDelegate (for example canBecomeKey, etc). Will default to NSWindow so it will be a noop for existing code.