According to your advice, we have to duplicate the code onGetSubModule() , onInitSubmodule for each tabwidget we manage with mainMenu of myMainform and duplicate onEnterDbWidget for each tabPage.I think the code will not be optimized. What is your opinion?
Med ________________________________ De : Martin Schreiber <[email protected]> Envoyé : lundi 15 octobre 2018 09:54 À : [email protected] Objet : Re: [MSEide-MSEgui-talk] Variable scoping; On Sunday 14 October 2018 21:27:43 mohamed hamza wrote: > Suppose we have 2 grids inside teditpage1 and we want to change > dso.dataset according to the grid we selected. > we create event in baseeditpagefo > > Onenter: > dataso.dataset:=tdbstringgrid(sender).datalink.datasource.dataset; Or in better in teditpage1 where we better know the type of "sender" parameter? " implementation uses editpage1form_mfm,editform; procedure teditpage1fo.enterev(const sender: TObject); begin editfo.dataso.dataset:= tdbstringgrid(sender).datalink.datasource.dataset; end; " > > this assignment is not considered in baseeditfo.dataso : > We keep the dataset that we have loaded with submodule? > Yes, we can use it as "maindatasource" for the DB-edit widgets of the editpage form. Don't set its datasource property if you don't need it or use a base form without datasource component. Martin _______________________________________________ mseide-msegui-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
_______________________________________________ mseide-msegui-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

