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
Exposing access to the DispatcherWindow for a given script. #1033
Exposing access to the DispatcherWindow for a given script. #1033
Conversation
Having a method to set the dispatcher in a dispatcher window seems entirely reasonable, but it should be I'm not so sure about exposing I like the idea of If you just want to be able to set a default and then leave it alone, I'd plump for the |
Hmm, I think I spoke too soon. I've said in the past that I don't like the registration of dispatcher instances (rather than types) because there's no effective way for two clients to share a dispatcher instance without resetting all the plugs to the default before changing what they want (and there's certainly no way of sharing a dispatcher instance on different threads for that reason). Having a default dispatcher instance just makes that worse. What do you think? |
Yeah, that's why I went for the UI approach initially, because I thought you wouldn't like the defaultDispatcher instance. About For my current use I just want to set the default and let the window manage the rest. I guess in theory some other UI might want to set the dispatcher itself, say if Jabuka wanted to initiate a farm submission, but be able to use the In any case, how do you think we resolve this? The driving goal is that Yuta wants Caribou to startup with the |
I don't know if this is a can of worms or not, but what if we :
|
ca2bb61
to
b453068
Compare
I've forced over with the changes we discussed offline. |
Now we have #1038 in the works, what do you think to returning to my idea of making the dispatcher registry hold creators rather than instances, and have |
I don't mind looking into that change as well, but having played a bit with |
So to clarify, I'd vote to merge this as is (assuming that last commit looks right to you), and address this registry change in #922, which I've added to the current milestone. |
Agreed - I like it too. What do you think to having |
Added acquire() and get/setDispatcher() methods. Removed dispatcher(), but that shouldn't be a compatibility break because it wasn't public until now.
b453068
to
a77be46
Compare
I've rebased on master and added a commit for the change you suggested. |
Great - thanks. |
Exposing access to the DispatcherWindow for a given script.
Also added a method to set the dispatcher selection. This is so certain apps can choose what dispatcher to start out with. I wasn't really sure if this should be done in this way, or by adding a
static Dispatcher *Dispatcher::defaultDispatcher()
or similar toGaffer::Dispatcher
itself.