observed icon indicating copy to clipboard operation
observed copied to clipboard

emit directly from add_observer()

Open kubaraczkowski opened this issue 10 years ago • 4 comments

Hi,

Speaking about PyQt4, would it be possible to attach emitting a signal directly at a place where add_observer is called? like this in the view part:

self.model.set_state.add_observer(self._model_state_change_signal.emit)

considering that model.set_state has appropriate decorator and that the set_state method takes one argument which fits to the _model_state_change_signal type

kubaraczkowski avatar Feb 04 '15 15:02 kubaraczkowski

I'm not entirely sure what you mean here. Any chance you could give an example of what you're trying to do?

DanielSank avatar Feb 04 '15 19:02 DanielSank

here's the gits of it: https://gist.github.com/kubaraczkowski/6ede45a45c0b842cc44a

On Wed, Feb 4, 2015 at 8:45 PM, Daniel Sank [email protected] wrote:

I'm not entirely sure what you mean here. Any chance you could give an example of what you're trying to do?

— Reply to this email directly or view it on GitHub https://github.com/DanielSank/observed/issues/11#issuecomment-72924403.

kubaraczkowski avatar Feb 06 '15 08:02 kubaraczkowski

@kubaraczkowski I see the issue here now. This is definitely fixable. I just need to support making the weak referencing optional, which I planned to do anyway.

DanielSank avatar Jul 28 '15 18:07 DanielSank

@kubaraczkowski Have you written a fix for this? Pull requests are always welcome.

DanielSank avatar Jul 27 '17 18:07 DanielSank