Comments (16)
This will come with 2.0 when class hierarchy walking is restored. This was intentionally removed for the 1.x versions.
from otto.
I appreciate the decision, and it's easy enough to work around with enough care.
That said, gIven how easy it is to accidentally subscribe to events in a class and then subclass it, I wonder if either of these would be useful:
- a warning could be logged (difficult, since you've kept dependencies minimal and there's no logging)
- a "strict" flag for the
Bus
, where anIllegalArgumentException
might be thrown
if you try to subscribe to events using a non-final class.
In my code base, this is effectively what I've tried to do to avoid accidentally losing events.
from otto.
So, quick experiment leads me to the fact that anonymous inner classes are non-final (I'm sure there's a good reason). Oh well.
from otto.
@JakeWharton I seem to have an error with unregistering Subscribers using 2.0 snapshot. It's the IllegalArugmentException "Missing Subscriber...". Do you have to handle subscription differently in 2.0?
from otto.
I wasn't even aware 2.0 compiled, to be honest.
from otto.
The clean android code project uses it because the change is necessary for
integration with AndroidAnnotations, isn't it?
On Feb 27, 2013 1:39 PM, "Jake Wharton" [email protected] wrote:
I wasn't even aware 2.0 compiled, to be honest.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/61#issuecomment-14201821
.
from otto.
Yes, but it's a long way from actually being a shippable version of the library. It doesn't surprise me at all that there are problems with it. I wouldn't recommend using it until we move it to the master
branch to dictate that it's relatively stable and pushing toward release.
from otto.
That's what I was afraid of. I thought I would give it a try to find out
though. Would love to have these libraries working together. I'm all for
readable, maintainable code.
On Feb 27, 2013 2:07 PM, "Jake Wharton" [email protected] wrote:
Yes, but it's a long way from actually being a shippable version of the
library. It doesn't surprise me at all that there are problems with it. I
wouldn't recommend using it until we move it to the master branch to
dictate that it's relatively stable and pushing toward release.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/61#issuecomment-14203331
.
from otto.
Well I'm starting actual 2.0 development today or tomorrow so it should move forward quickly. As it exists now it's more of a proof-of-concept.
from otto.
Oh, awesome! Is there anything I can follow to see if I can contribute to
its progress. Annotation processing is a bit outside my usual domain. These
issues are for the whole repository, not just a branch, right?
On Feb 27, 2013 2:14 PM, "Jake Wharton" [email protected] wrote:
Well I'm starting actual 2.0 development today or tomorrow so it should
move forward quickly. As it exists now it's more of a proof-of-concept.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/61#issuecomment-14203713
.
from otto.
All issues relevant to its development will be organized on the 2.0 milestone of the project.
from otto.
I need to rebase it first, though, since the branch is about 6 months out of date.
from otto.
Got it.
On Feb 27, 2013 2:21 PM, "Jake Wharton" [email protected] wrote:
I need to rebase it first, though, since the branch is about 6 months out
of date.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/61#issuecomment-14204069
.
from otto.
@JakeWharton what is the status of the 2.0 branch? Did you reject to continue development in that way?
from otto.
Nobody is working on it. We have no plans to release 2.0 at this time.
On May 28, 2014 12:24 PM, "Csaba Kozák" [email protected] wrote:
@JakeWharton https://github.com/JakeWharton what is the status of the
2.0 branch? Did you reject to continue development in that way?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/61#issuecomment-44452825
.
from otto.
#135 will restore hierarchy walking.
from otto.
Related Issues (20)
- duplicate entry: com/squareup/otto/AnnotatedHandlerFinder.class HOT 1
- NoClassDefFoundError when running in Android OS below 5.0. HOT 3
- subcriber received two same event HOT 2
- Please include the deprecated notice in the info website
- Examples HOT 1
- Please add notice to website about otto deprication HOT 1
- How to customize ThreadEnforcer HOT 4
- Using privitives in callback haven't invoked it. HOT 3
- Link for Migrating to RxJava is dead. HOT 1
- Private EventHandler makes it impossible to override Bus#dispatch HOT 1
- OnEvent not calling in navigationdrawer fragment
- otto with JavascriptInterface in api < 17 HOT 1
- Ship proguard rules in the aar? HOT 1
- A new call to post in a subscriber does not call its subscribers until the first call is completed HOT 1
- Reason for its name HOT 1
- android.database.sqlite.SQLiteException: no such table HOT 4
- Update for Gradle 4 and Bus doesnt work more. HOT 3
- I can't receive the event HOT 1
- java.lang.RuntimeException: Could not dispatch event: class abc to handler
- java.lang.RuntimeException: Could not dispatch event HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from otto.