ivoflipse / Pawlabeling

Tool for processing and analyzing pressure measurements
Other
18 stars 1 forks source link

Add subscribe/unsubscribe to prevent useless work #63

Closed ivoflipse closed 10 years ago

ivoflipse commented 11 years ago

PubSub is great, but it does bring you to callback hell somewhat. For example, but the processing and analysis widget rely on event triggered on the database widget (like selecting a subject or session). But when changing the measurement while you're on the processing widget, I don't need to make changes to the processing widget, because they won't get drawn and won't affect each other anyway.

So provide a way to effectively decouple the two, so we only do work that we have to do. I've made a start, but it might be worthwhile to go even one step further and to keep an eye on how well its working.

ivoflipse commented 10 years ago

Given the way I restructured things, where the model is called directly, this isn't really a problem anymore