On Friday 06 July 2018 12:26:52 mohamed hamza wrote:
> The project  contains a BaseForm with the following objects:
>
>
>   1.   Navigator,
>   2.  Datasource
>
>
>
>
> And 2 Methods: (OnActivate, OnStateChange)
>
>
> See the attachments.
>
>
> all other forms are inherited from BaseForm.
>
>
> I think that you can understand what I  want to do?
>
>
I often use a similar approach with common ancestors for edit and list forms. 
The base forms have a tdatasource with empty dataset property. An actual 
descendant edit or list form has the datasource.dataset property set to the 
wanted dataset, there is no need for code in OnActivate event. Most likely 
OnCreate or OnCreated or on OnEventLoopStart would be more appropriate 
anyway.
See
https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/kicad/bom
particularly as example
https://gitlab.com/mseide-msegui/mseuniverse/blob/master/tools/kicad/bom/componenteditform.pas
and its ancestor base form
https://gitlab.com/mseide-msegui/mseuniverse/blob/master/tools/kicad/bom/recordeditform.pas
which is used as base for several different record edit forms.

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to