Wednesday, 24 September 2008

Run New Presentation Based on Existing Instance

When you plan to implement e.g. a wizard, it might come in handy to run several presentations based on the same instance of a Meta4Object.

To open a new presentation use the element "Extends"; the Idinstance indicates the presentation to open. If the property Inheritdata is set to 1, the presentation uses the current instance of the Meta4Object.

The following code could represent the event click of the button "Next".

BEGIN Evclick evclickNext
BEGIN Extends extNextStep
Idchannel = "CRCO_PA_MT_WIZARD"
Idnode = "CRCO_PA_MT_WIZARD"
Iditem = "SRCO_LB_CANCEL"
Idinstance = "CRCO_PA_MT_WIZARD_S2"
Inheritdata = 1
END
BEGIN Action_call acUnloadForm
Sentence = "*O*../../../../Form.Unload(END_OK)"
END
END



Note: The Idchannel (Meta4Object) of the current and the new presentation should be the same.