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

ScopeSchedular not working (with Rx 4.0.7) #130

Open
Roaders opened this issue Jan 29, 2016 · 3 comments
Open

ScopeSchedular not working (with Rx 4.0.7) #130

Roaders opened this issue Jan 29, 2016 · 3 comments

Comments

@Roaders
Copy link
Contributor

Roaders commented Jan 29, 2016

I think Scope Schedular needs to be updated to work with Rx 4.0.7. I get the following:

TypeError: state is not a function
at rx.angular.js:604
at Scope.$eval (angular.js:16251)
at Scope.$apply (angular.js:16351)
at ScopeScheduler.Rx.ScopeScheduler.ScopeScheduler.schedule (rx.angular.js:602)
at ScopeScheduler.schedulerProto.scheduleRecursive (rx.all.js:1108)
at ObserveOnObserver.Rx.internals.ScheduledObserver.ScheduledObserver.ensureActive (rx.all.js:1934)
at ObserveOnObserver.next (rx.all.js:1955)
at ObserveOnObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (rx.all.js:1752)
at ObserveOnObserver.tryCatcher (rx.all.js:63)
at AutoDetachObserverPrototype.next (rx.all.js:11612)

It also cannot be used in place of the Rx.Scheduler.currentThread:

Error:(15, 6) TS2322: Type 'ScopeScheduler' is not assignable to type 'ICurrentThreadScheduler'.
 Property 'scheduleRequired' is missing in type 'ScopeScheduler'.
@mattpodwysocki
Copy link
Member

@Roaders can you give me a code example where this is not working?

@Roaders
Copy link
Contributor Author

Roaders commented Jan 30, 2016

@mattpodwysocki sure. Check out this branch:

https://github.com/Roaders/SpotifyExportTool/tree/scope_schedular

just paste in one track and you'll get an error in the console. In this example the Rx.Scheduler.immediate is set to a new ScopeSchedular in app.ts and this is then used in SpotifyExportController.

I am trying to figure out a better way of just using ScopeSchedular for all rx operations so angular always gets updated.

@samal-rasmussen
Copy link

samal-rasmussen commented Jun 6, 2016

I tried .observeOn(new Rx.ScopeScheduler($rootScope)) and got the same error. I'm on rx.angular 1.1.3, rx 4.1.0, and angular 1.5.5.

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

No branches or pull requests

3 participants