3. Programming Frames : How You Can Invoke Frames : Pop-up Frames : How You Can Call Predefined Pop-up Frames
 
Share this page                  
How You Can Call Predefined Pop-up Frames
Predefined pop‑up frames can be called only for the current frame or procedure. To call them, you invoke one of four methods of the ProcExec system class:
InfoPopup
ConfirmPopup
ReplyPopup
FilePopup
The syntax is:
CurFrame.method(parameters)
or
CurProcedure.method(parameters)
method
Refers to one of the four previously mentioned methods. For more information about the parameters available, see the ProcExec system class in the Language Reference Guide.
You also can open Information and Reply pop‑ups with the OpenROAD message and prompt statements. For more information about using these statements, see A Simpler Process for Creating Information and Reply Popups (see A Simpler Process for Creating Information and Reply Pop-ups).
To specify the value of a parameter, you must enter the parameter name followed by the value. The following example from the video_detail frame script uses the ConfirmPopup method to verify that the user wants to delete the video. The messagetext parameter specifies the text displayed in the pop‑up frame.
on click delete_button =
begin
    status = CurFrame.ConfirmPopup(messagetext =
        'You are going to delete this video.');
    if status != PU_OK then
        resume;
    endif;
...
ConfirmPopup, ReplyPopup, and FilePopup have return values. You must specify a variable of the appropriate type to receive the return value. In the previous example, the status variable is used to hold the return value.
Both the ReplyPopup and FilePopup methods have reply parameters. For the ReplyPopup method, this parameter contains a response that the user enters. For the FilePopup method, this parameter contains a file that the user selects. This reply parameter is a reference variable of type StringObject (for more information about the StringObject system class, see Working with Images and Text Strings (see Working with Images and Text Strings)).
When you invoke the ReplyPopup or FilePopup method, you can specify this parameter to display an initial reply in the pop‑up frame. For example, with the FilePopup method you can use the reply parameter to specify a default file selection. If the user types in a different reply or selects a different file name, the value of the reference variable is updated.