Skip to content
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

Component/Publisher initialization may be broken -- or is somewhat obscure #137

Open
scabug opened this issue Aug 12, 2011 · 2 comments
Open

Comments

@scabug
Copy link

scabug commented Aug 12, 2011

I'm not quite sure whether this is a bug or intended behavior: A Publisher automatically listens to itself, "for convenience". For a Component, this call to listenTo() calls Publisher's subscribe, not LazyPublisher's - because it happens within initialization, if I'm correct. Additionally, LazyPublisher.subscribe checks for listeners.size == 1 rather than 0. Is this the way it was meant to be? If so, it is at least very obscure, and it would be nice of you to add some comment, because it's hard to tell from the code what's going on and how it should be used.

My current solution is to call listenTo(this) again in my Component subclass. This works for me, but is this how you intended it to be used? Is the calling of listenTo(this) in Publisher really a good thing? Maybe it makes things more complicated than it's worth... What do you think?

Christoph

@scabug
Copy link
Author

scabug commented Aug 12, 2011

Imported From: https://issues.scala-lang.org/browse/SI-4904?orig=1
Reporter: Christoph Radig (cradig)
Affected Versions: 2.9.1

@scabug
Copy link
Author

scabug commented Jul 10, 2013

@adriaanm said:
Unassigning as milestone deadline was reached.

@scabug scabug closed this as completed Jul 17, 2015
@SethTisue SethTisue transferred this issue from scala/bug Nov 19, 2020
@SethTisue SethTisue reopened this Nov 19, 2020
@scala scala deleted a comment from scabug Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants