void updateCaller()
{
Common common;
Object dataSource;
Object caller;
;
//-----------------------------------
//We are notifying using the dataSource
common = element.args().record();
if (common
&& common.isFormDataSource()
&& formDataSourceHasMethod(common.dataSource(), identifierstr(SomethingWasHappend)))
{
dataSource = common.dataSource();
dataSource.SomethingWasHappend();
}
//-----------------------------------
//-----------------------------------
//We are notifying using the form
caller = element.args().caller();
if (caller
&& classidget(caller) == classnum(SysSetupFormRun)
&& formHasMethod(caller, identifierstr(SomethingWasHappend)))
{
caller.SomethingWasHappend();
}
//-----------------------------------
}
Implement the handling method in the parent form:
void SomethingWasHappend()
{
;
info("Something was happend (Form)");
}
Or if you prefer, in the DataSource:
void SomethingWasHappend()
{
;
info("Something was happend (DataSource)");
}
Invoking it from a simple button inside the child form:
void clicked()
{
super();
element.updateCaller();
}
{
Common common;
Object dataSource;
Object caller;
;
//-----------------------------------
//We are notifying using the dataSource
common = element.args().record();
if (common
&& common.isFormDataSource()
&& formDataSourceHasMethod(common.dataSource(), identifierstr(SomethingWasHappend)))
{
dataSource = common.dataSource();
dataSource.SomethingWasHappend();
}
//-----------------------------------
//-----------------------------------
//We are notifying using the form
caller = element.args().caller();
if (caller
&& classidget(caller) == classnum(SysSetupFormRun)
&& formHasMethod(caller, identifierstr(SomethingWasHappend)))
{
caller.SomethingWasHappend();
}
//-----------------------------------
}
Implement the handling method in the parent form:
void SomethingWasHappend()
{
;
info("Something was happend (Form)");
}
Or if you prefer, in the DataSource:
void SomethingWasHappend()
{
;
info("Something was happend (DataSource)");
}
Invoking it from a simple button inside the child form:
void clicked()
{
super();
element.updateCaller();
}