get_datafields_by_sc
call_SUB
Call_Sub()
.
#Create object of ppms_cu.Action class ppms_cu_action = ppms_cu.Action(invoker_module) #Create sub_mod_dictionary sub_mod_dict={} sub_mod_dict['009101'] = ["right",0.3,{'@L4':[values]}] ppms_cu_action.call_SUB(sub_mod_dict=sub_mod_dict)
on_load()
and on_focus()
methods, you can specify more accurately which actions are started when activating the submodule.
modul_macro_helper.py
Python module for a facilitated creation of module macros.
Call_Sub()
for the first time causes the on_load()
methods to be carried out. on_load()
, on_load()
must open the focus()
method of the Objects module. focus()
method causes the module to be activated at the client and on_focus()
to be run.
on_focus()
method is opened each time.
from types import MethodType mod = ppms.get_target_module() def show_project(self, project_id): self.menu(19) project_da = self.get_das()[0] first_rec = project_da.get_records()[0] project_df = first_rec.get_df('pr_id') project_df.set_text_value(project_id) def on_load(): mod.menu(11) mod.show_project = MethodType(show_project, mod) def on_initial_focus(): mod.show_project('4711') def on_focus(): pass def on_reset(): on_load()