FWExecView, FWLoadModel, FWLoadView and FWMVCMenu
Separates MVC loading, presentation and menu roles.
Overview
FWLoadModel/FWLoadView retrieve program definitions without necessarily displaying or saving. FWExecView displays the View and returns 0 for OK and 1 for Cancel. A supplied oModelAct must already be active and its operation overrides argument three. FWMVCMenu supplies default MenuDef options; its official example returns that structure despite Nil in the syntax line. The fragment prepares uninvoked calls for an existing owned program. Localized loading uses the name without country suffix. (Sources: refs. 1–4.)
Commented example
// Fragment: owned program already provides ModelDef and ViewDef.
bModel := {|cProgram| FWLoadModel(cProgram)}
bView := {|cProgram| FWLoadView(cProgram)}
bMenu := {|cProgram| FWMVCMenu(cProgram)}
// Do not evaluate: omitted operation defaults to viewing.
bOpen := {|cProgram| FWExecView("Review",cProgram)}Prepared blocks; no model loaded, window opened or data saved. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Define model ownership and cleanup; verify cancellation and permissions.
- Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.