Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

hiFormUnmap

hiFormUnmap( 
r_form 
) 
=> t / nil 

Description

Unmaps the form from the screen before a callback is completed.

This function can be used with hiSetCallbackStatus if the unmapAfterCB argument to hiCreateAppForm has been set to t. It unmaps the form only if the callback status of the form is t and if it is called within the form Done callback. This function is especially useful for lengthy callback routines that must do error checking.

Argument

r_form

Form to be unmapped.

Values Returned

t

The form is unmapped.

nil

r_form is not a form created by hiCreateAppForm.

Examples

This example creates a form that prompts the user for a file name. The form callback immediately unmaps the form before processing the specified file, if the file name is valid.

; First, create the form. 
myForm = hiCreateAppForm( ?name 'myForm ?formTitle "title" ?callback 'myCB ?fields           
list ( hiCreateStringField( ?name 'fileName ?prompt "Enter filename:" ) ) ?help "" ?unmapAfterCB t ) ; myCB - form callback procedure procedure ( myCB ( form "r" ) ; is the filename valid? if( isFile ( form->fileName->value ) then hiSetCallbackStatus(form t)     ; status is OK
hiFormUnmap ( form )     ; unmap the form
; process filename...
else

        ; keep the form on screen
hiSetCallbackStatus(form nil)
; print an error message
printf("Invalid file '%s'.\n"
form->fileName->value)
)
)

Related Topics

hiCreateAppForm

hiSetCallbackStatus

Form and Field Functions


Return to top
 ⠀
X