Discussion:
[dart-misc] BREAKING CHANGE: StreamController constructor change
Florian Loitsch
2013-04-15 16:37:45 UTC
Permalink
I just landed r21472 which changes the constructor of the StreamController
class.
Instead of having a onPauseStateChange or onSubscriptionStateChange it now
takes:
onListen, onPause, onResume and onCancel handlers.

Adapting old code is easy:
=== Old:
var controller = new StreamController(
onPauseStateChange: pauseHandler,
onSubscriptionStateChange: subscriptionHandler);
=== New:
var controller = new StreamController(
onPause: pauseHandler,
onResume: pauseHandler,
onListen: subscriptionHandler,
onCancel: subscriptionHandler);
--
Give a man a fire and he's warm for the whole day,
but set fire to him and he's warm for the rest of his life. - Terry
Pratchett
--
Consider asking HOWTO questions at Stack Overflow: http://stackoverflow.com/tags/dart
David Kerr
2013-04-15 18:24:19 UTC
Permalink
Is anyone else still working on dart apart from you :) ? You seem to be the only one committing. Everything seems to be very quiet. Are people being pulled off the project?

Without knowledge of the plans apart from a vague "1.0 in summer" then I think people will start worrying that is another (expensive) project about to be abandoned. Which would be a huge shame.
--
Consider asking HOWTO questions at Stack Overflow: http://stackoverflow.com/tags/dart
Matthew Butler
2013-04-15 18:31:07 UTC
Permalink
Post by David Kerr
Is anyone else still working on dart apart from you :) ? You seem to be
the only one committing. Everything seems to be very quiet. Are people
being pulled off the project?
Without knowledge of the plans apart from a vague "1.0 in summer" then I
think people will start worrying that is another (expensive) project about
to be abandoned. Which would be a huge shame.
Not sure where you got that idea from. Just because not all changes/commits
are breaking doesn't mean no one else is commiting and definitely doesn't
mean the project is dying. You want to see the commits take a look at:
https://code.google.com/p/dart/source/list
And also build status at:
http://buildbot.dartlang.org

All the breaking changes today alone shows it's far from 'very quiet' on
the project (note Florian isn't the only one to have announced breaking
changes today, though perhaps the majority of them).

Matt
--
Consider asking HOWTO questions at Stack Overflow: http://stackoverflow.com/tags/dart
Florian Loitsch
2013-04-15 18:53:27 UTC
Permalink
Post by David Kerr
Is anyone else still working on dart apart from you :) ? You seem to be
the only one committing. Everything seems to be very quiet. Are people
being pulled off the project?
No worries.
I just had a productive weekend and committed tons of stuff today. What you
see today is an outlier in the positive sense (more commits).
Post by David Kerr
Without knowledge of the plans apart from a vague "1.0 in summer" then I
think people will start worrying that is another (expensive) project about
to be abandoned. Which would be a huge shame.
--
http://stackoverflow.com/tags/dart
--
Give a man a fire and he's warm for the whole day,
but set fire to him and he's warm for the rest of his life. - Terry
Pratchett
--
Consider asking HOWTO questions at Stack Overflow: http://stackoverflow.com/tags/dart
David Kerr
2013-04-15 19:02:21 UTC
Permalink
Ah sorry. It's been a long days work from 4.30 this morning.

I do think, though, that more transparency and detail about the plans
would go a long way to enthusing a wider community to experiment with Dart.

Keep up the good work!

David
Post by Florian Loitsch
Post by David Kerr
Is anyone else still working on dart apart from you :) ? You seem to be
the only one committing. Everything seems to be very quiet. Are people
being pulled off the project?
No worries.
I just had a productive weekend and committed tons of stuff today. What
you see today is an outlier in the positive sense (more commits).
Post by David Kerr
Without knowledge of the plans apart from a vague "1.0 in summer" then I
think people will start worrying that is another (expensive) project about
to be abandoned. Which would be a huge shame.
--
http://stackoverflow.com/tags/dart
--
Give a man a fire and he's warm for the whole day,
but set fire to him and he's warm for the rest of his life. - Terry
Pratchett
--
http://stackoverflow.com/tags/dart
--
Consider asking HOWTO questions at Stack Overflow: http://stackoverflow.com/tags/dart
Kyaw
2017-10-03 02:54:10 UTC
Permalink
Documentation still refer to onSubscriptionStateChange

https://api.dartlang.org/stable/1.24.2/dart-async/StreamController-class.html
Post by Florian Loitsch
I just landed r21472 which changes the constructor of the StreamController
class.
Instead of having a onPauseStateChange or onSubscriptionStateChange it now
onListen, onPause, onResume and onCancel handlers.
var controller = new StreamController(
onPauseStateChange: pauseHandler,
onSubscriptionStateChange: subscriptionHandler);
var controller = new StreamController(
onPause: pauseHandler,
onResume: pauseHandler,
onListen: subscriptionHandler,
onCancel: subscriptionHandler);
--
Give a man a fire and he's warm for the whole day,
but set fire to him and he's warm for the rest of his life. - Terry
Pratchett
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Loading...