[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] update on some test work.

From: Karsten Hilbert
Subject: Re: [Gnumed-devel] update on some test work.
Date: Tue, 4 Nov 2003 12:00:33 +0100
User-agent: Mutt/

>> You also create instances: gmCurrentPatient (kwds['id']) , this isn't 
>> necessary.
>> gmCurrentPatient responds 
>> itself to patient_selected internally,
Actually, to be precise, no. gmPatientSelector lets the user
select a patient and then tells gmCurrentPatient() to update
itself by handing it an ID in __init__(). This, in turn, will
fire a pre- and a post-selection notification from within
gmCurrentPatient() aimed at anyone interested in those events.
Those others (such as the top panel age/allergy fields) will
react to post-seletion events and update themselves if
appropriate. They need to, however, get a new instance of
gmCurrentPatient or even a new handle. The old one will
magically point to the updated instance (it really still is
the same one which just happens to point to another
gmPerson() instance internally).

So, if someone decides to write another patient selector
and doesn't want to reuse the one used in the top panel
(yes, it's a specialized wxTextCtrl that is reusable) they
will have to tell gmCurrentPatient() to update itself at some
point. And, yes, gmPatientSelector really should listen for
post-selection events from other selectors. Currently that's
handled indirectly via the top panel :(

GPG key ID E4071346 @
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

reply via email to

[Prev in Thread] Current Thread [Next in Thread]