RSS

Simple Form — Basic PML

16 Jan

Simple Form

You define a form using a command sequence that starts with:

setup form !!formname

and ending with:

exit

Between these two commands come a number of optional subcommands which define the gadgets on the form.

The following example defines a small form, containing the text 'Hello World', and a button labelled ‘Goodbye', which removes the form when pressed:

setup form !!hello

 paragraph .Message text 'Hello world'

 button .bye 'Goodbye' OK

exit

untitled

 

Some points to note about the above definition and the form it creates are:

  • there are no user-defined methods on this form, and so the setup form . . . exit sequence is the complete form definition;
  • the paragraph command adds a paragraph gadget to the form (a paragraph gadget is just a piece of text displayed on the form). The name of the gadget is Message, and the dot before the name indicates that the gadget is a member of the form. The text itself is specified after the keyword TEXT.
  • the button subcommand adds a button gadget named .bye. The text on the button will be ‘Goodbye'. The keyword OK is a form control attribute that specifies that the action of this button is to remove the form from the screen.

To display the form in this example, you can use the command:

show !!Hello
 
Leave a comment

Posted by on January 16, 2013 in PDMS Training and Knowledge

 

Tags: , , , , , , , ,

Leave a comment