| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 223960a commit 73b1fbe
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -136,7 +136,7 @@ void EventExample2() | |||
| 136 | 136 | // stream just indicates that it has fired, i.e. it behaves like a token stream. | |
| 137 | 137 | auto emitter = D::MakeEventSource(); | |
| 138 | 138 | ||
| 139 | - auto counter = Iterate(0, emitter, Incrementer<int>()); | ||
| 139 | + auto counter = Iterate(0, emitter, [] (int v) { return v+1; }); | ||
| 140 | 140 | ||
| 141 | 141 | // In this case, the observer func must not declare a parameter for token streams. | |
| 142 | 142 | Observe(emitter, [] { | |
@@ -223,7 +223,7 @@ class Manager : public ReactiveObject<D> | |||
| 223 | 223 | Manager(Company& c) : | |
| 224 | 224 | CurrentCompany{ MakeVar(ref(c)) } | |
| 225 | 225 | { | |
| 226 | - nameObs = REACTIVE_REF(CurrentCompany, Name).Observe([] (string name) { | ||
| 226 | + nameObs = Observe(REACTIVE_REF(CurrentCompany, Name), [] (string name) { | ||
| 227 | 227 | cout << "Manager: Now managing " << name << endl; | |
| 228 | 228 | }); | |
| 229 | 229 | } | |
@@ -345,8 +345,6 @@ int main() | |||
| 345 | 345 | LoopTest(); | |
| 346 | 346 | #endif | |
| 347 | 347 | ||
| 348 | - //Debug(); | ||
| 349 | - | ||
| 350 | 348 | #ifdef REACT_ENABLE_LOGGING | |
| 351 | 349 | std::ofstream logfile; | |
| 352 | 350 | logfile.open("log.txt"); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments