The following example is the onOpen event handler for the FISH.WFM form. It assigns the popup in FISH.POP as the popup menu for the form.

function Form_onOpen

   set procedure to FISH.POP additive 

   this.popupMenu := new fishPopup(this,"POPUP") 

After opening the FISH.POP file as a procedure file to load the popup class that it contains, the second statement creates the Popup object as a child object of the form with the name "POPUP", and assigns the resulting object to the form’s popupMenu property.