[Top][All Lists]

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

Re: [Gnumed-devel] modified notebook page behaviour

From: Hilmar Berger
Subject: Re: [Gnumed-devel] modified notebook page behaviour
Date: Sun, 29 Jun 2003 15:02:29 +0200 (CEST)

On Thu, 19 Jun 2003, Karsten Hilbert wrote:

> All,
> many notebook page plugins need a patient to be selected in
> order to be meaningful. Implemented page change vetoing in the
> main notebook. Default (no code change in plugins) vetoing of
> plugin selection happens when a) no patient is selected
> (implemented) or b) the notebook is locked (not implemented).
I can't see the need of default vetoing if no patient is selected.
IMHO it's rather annoying if you can't select any notebook page without
selecting a patient. Imagine something went wrong with the config and you
can't select a patient or you would just like to browse the manual or the
waiting room list. I would suggest that every notebook page must implement
a can_receive_focus() method if it want's to veto page selection. Only the
plugin knows which conditions has to be met in order to show correct
output. That is contrary to your suggestion of overloading the
can_receive_focus method if you want no veto.
We should not block anything by default if there is no obvious need to do
so. Furthermore the majority of plugins do not need any patient data until
now (except Clinical, Documents and SOAP).

> The veto is notified to the user by a
>  "Cannot switch to [plugin name]: no patient selected"
> in the statusline (do people think this is sufficient or do
> you want a beep and a popup box?). Use the top panel patient
I would like to signal the error using a beep and maybe some red
background in the statusline.

> selector to select a patient. Plugins that need to get their
> own can_receive_focus() method due to not being dependant on
> whether a patient is selected or not: Demographics, User
> Manual, StiKo Browser, Contacts, etc. None of them converted
> yet but easy to do: add
> def can_receive_focus():
>     pass
Please see above.


reply via email to

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