On Tue, 9 Aug 2005 19:43:17 +0200
Karsten Hilbert <[EMAIL PROTECTED]> wrote:
> Upon receiving the NOTIFY gmBackendListener will invoke the
> callbacks registered for this NOTIFY. The only registered
> listener is the method _db_callback_episodes_modified() in
> cClinicalRecord. This method flushes the "episodes" cache.
> It then sends out a *dispatcher* signal "episodes modified".
> The dispatcher sends it to its registered listeners for that
> signal. Which (among others) happens to be a function in the
> EMR tree widget. That function (or any other that happens to
> come first) re-gets the episodes from cClinicalRecord
> thereby triggering a delayed-until-now backend re-fetch into
> the cache thereof.
If this is true, why line A gets executed in the very moment that get_episodes
called by line B (from EMR tree widget) ???
def _db_callback_episodes_modified(self):
try:
A del self.__db_cache['episodes']
except KeyError:
pass
try:
del self.__db_cache['problems']
except KeyError:
pass
B gmDispatcher.send(signal = gmSignals.episodes_modified(),
sender = self.__class__.__name__)
return 1
Hilmar
--
_______________________________________________
Gnumed-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnumed-devel