Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Add events #2075

Open
DStrelak opened this issue Apr 5, 2020 · 4 comments
Open

Add events #2075

DStrelak opened this issue Apr 5, 2020 · 4 comments

Comments

@DStrelak
Copy link
Contributor

DStrelak commented Apr 5, 2020

Is your feature request related to a problem? Please describe.
When I set e.g. input movie set, I would like to automatically preset some default values in the protocol, based on the e.g. size of the movie.

Describe the solution you'd like
I would like to be able to register specific callback for input change event

Describe alternatives you've considered
Similar functionality can be achieved by inheritance / overriding

@pconesa
Copy link
Member

pconesa commented Apr 6, 2020

Thank you @DStrelak .

@delarosatrevin
Copy link
Member

Please check the protocol base class...I think this is already implemented, although not used in many protocols. It is called trigger or something like that.

@pconesa
Copy link
Member

pconesa commented Apr 6, 2020

Hi, @delarosatrevin. I wasn't aware of this. I've looked up for trigger in the code and nothing related pops up.

I've reviewed parms.py, and haven't seen any similar....please, please, please, enlighten us!

@delarosatrevin
Copy link
Member

Input variables have a 'trace' where callback can be registered. The following example change the pointer class when another input changes:

https://github.com/scipion-em/scipion-em-emxlib/blob/devel/emxlib/protocols/protocol_export.py#L60

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants