baconjs / bacon.js

Functional reactive programming library for TypeScript and JavaScript

Home Page:https://baconjs.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

observable.deps() is not working.

wa-sunlab opened this issue · comments

commented

hello , i would like to ask about why observable.deps() is not working , i have tried as

Bacon.spy(function (obs) {
console.log(obs.deps());
});

In console i got error that deps() is not a function ?

And another this in would like to ask is that
what is the current status about following discussion
#273

Do we have such visualizing tool for debugging already ?

Many Thanks in advance.

Hi,

The deps() method had been removed and was accessible by .desc.deps().

I restored the method to the API and it's once again available in version 0.7.88.

The introspection features were undocumented. I added a section to the readme: https://github.com/baconjs/bacon.js/#introspection-and-metadata

commented

i have read your in one of your comment on

"On the other hand, now there shouldn't be a need to subscribe, as you'll get all the events through your newEvent handler anyway."
#273

Could you please explain me what are {newObservable, newEvent} , and how can i use them ?

Actually i would like to log all observables (eventstream + property) to create dependency graph in chrome dev tool extension ,

Do we already have such extension ?

Best Regards
Waqas Abbas

That was probly just speculation; there's no "newEvent handler" concept in Bacon as we speak. For debug tools it would be useful to have a mechanism for snooping events without forcing a subscription on the observable. Could be implemented into the Dispatcher quite easily if there's pull for the feature.

The dep graph thing would be cool and I dont think we have that yet. Go ahead! I'll do my best to help.

wa-sunlab notifications@github.com kirjoitti 7.10.2016 kello 15.56:

i have read your in o one of your comment on

"On the other hand, now there shouldn't be a need to subscribe, as you'll get all the events through your newEvent handler anyway."
#273

Could you please explain me what are {newObservable, newEvent} , and how can i use them ?

Actually i would like to log all observables (eventstream + property) to create dependency graph in chrome dev tool extension ,

Do we already have such extension ?

Best Regards
Waqas Abbas


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

commented

Hello,

Thanks for your offer to help.
Yes i will need your help to develop some debugging tool.

I am using .spy to log observable values , when i try following code

http://jsfiddle.net/123xLwdd/

Why i am not getting values of my 3rd Observer which is made by "zip" of first two.

Thanks
Best Regards
Waqas

That's because Bacon.fromArray is a synchronous source and emits its value only once. See https://github.com/baconjs/bacon.js/wiki/FAQ#why-isnt-my-subscriber-called

If you use a "real" stream, it'll work. Try with Bacon.sequentially, for instance. See http://jsfiddle.net/rmojenv9/