Strategy Question
Publicado: Jue Jul 27, 2006 7:44 pm
In our application, I have several dialogs that contain some of the same
fields. Many of these fields require special handling or calculations, which
are generally handled through valid, action or on change clauses. In our
16-bit FiveWin version, I have had to copy the code for each field and
potentially change the resource ID when building new screens. When a change
is needed in the calculations or special handling, I have to search every
module for the field and update the VALID clause or ON CHANGE, ACTION code,
etc. This procedure is kind of a pain and prone to bugs if I miss one along
the way.
Is there a strategy that I can use to create a field repository that I can
inherit these special fields from? I've noticed the Calculated field usage
in some of the samples, but I am a novice so I don't know if this is the
right track. Basically, I want to give an edit field a field name that
contains the calculation logic in the on change or on exit events. This need
to be maintained in one location so I can reuse it over and over on
different screens.
I hope I am making sense. Any help you can provide is greatly appreciated.
Thanks,
Andy
fields. Many of these fields require special handling or calculations, which
are generally handled through valid, action or on change clauses. In our
16-bit FiveWin version, I have had to copy the code for each field and
potentially change the resource ID when building new screens. When a change
is needed in the calculations or special handling, I have to search every
module for the field and update the VALID clause or ON CHANGE, ACTION code,
etc. This procedure is kind of a pain and prone to bugs if I miss one along
the way.
Is there a strategy that I can use to create a field repository that I can
inherit these special fields from? I've noticed the Calculated field usage
in some of the samples, but I am a novice so I don't know if this is the
right track. Basically, I want to give an edit field a field name that
contains the calculation logic in the on change or on exit events. This need
to be maintained in one location so I can reuse it over and over on
different screens.
I hope I am making sense. Any help you can provide is greatly appreciated.
Thanks,
Andy