| Home | Previous Lesson: pfc_MRUSave Next Lesson: pfc_MRURestore |
As explained earlier, pfc_PreMRUSave is a placeholder event intended for populating the information to be saved in the MRU service. So, in pfc_PreMRUSave event, you need to add code to set N_cst_mruattrib attribute object's attributes. These are the values MRU service uses to save in its internal DataStore. Typically, you set these attributes with the information about current window.
The following is the structure of n_cst_mruattrib attribute object.
|
Variable |
Length |
Description |
|
is_id |
50 |
MRU group ID |
|
is_classname |
50 |
Window class name |
|
is_menuitemname |
50 |
Menu text |
|
is_menuitemkey |
100 |
Parameter to be passed to the window |
|
is_menuitemmhelp |
100 |
Menu Microhelp |
Typically, you don't want to write code for the pfc_PreMRUSave event in the MDI frame since you don't want to show the MDI window reference in its menu itself. If you do, nothing will happen at run-time when the user selects that menu option, since you can't open a MDI frame window with in another MDI frame window.
// Object: w_product_master
// Event: pfc_PreMRUSave
anv_mruattrib.is_id = this.classname()
anv_mruattrib.is_classname = this.classname()
anv_mruattrib.is_menuitemname = this.title
anv_mruattrib.is_menuitemkey = "pms"
anv_mruattrib.is_menuitemmhelp = "Click to open '" + this.title + "'"
return 1
| Home | Previous Lesson: pfc_MRUSave Next Lesson: pfc_MRURestore |