|
From: | Horst Herb |
Subject: | Re: [Gnumed-devel] signalling with passing of parameters |
Date: | Mon, 25 Nov 2002 11:11:59 +1100 |
User-agent: | Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2a) Gecko/20020910 |
Karsten Hilbert wrote:
Upon receiving the dispatcher signal "patient_changed" a callback to gmGuiMain.OnPatientChanged() happens. In there we rely on appropriate parameters being passed in via keyword parameters. I wonder if this is "appropriate" ?
I think it is. Passing parameters with the message makes sense in all cases where the parameters are likely to be reused by a large number of client widgets, and where the number of parameters is limited.
It makes a noticeable difference in performance.
I can see the benefit of passing in the ID of the patient for removing ambiguity in cases where several patients are concerned (waiting list, etc.) but what about the othe parameters ? Shouldn't we be going through gmCachedPerson to retrieve what we need ? Data in there will be cached partially already by whomever changed the currently selected patient in the first place.
I need to rewrite gmCachedPerson completely first. In it's current state, it is too problematic. I am working on the generic intelligent cache object.
Horst
[Prev in Thread] | Current Thread | [Next in Thread] |