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

applyEnterFun

applyEnterFun(
[ g_form ]
) 
=> t / nil 

Description

Calls doneProc, passes it the points you entered, resets the enterfunction, and calls initProc.

This function does not return from the active enterfunction.

applyEnterFun can be used in conjunction with doneProc to allow you to enter many shapes without having to start another enterfunction.

Argument

g_form

Form handle used to locate the enterfunction to apply. Normally the enterfunction applied is the one active in the current window. If you want to apply a specific enterfunction, whether or not it is the current window, there is no way to tell which window is the correct one. So you pass the same form that was originally supplied to the enterfunction to applyEnterFun, and it applies that specific enterfunction regardless of whether it is in the current window or not.

Values Returned

t

The enterfunction is begun.

nil

The enterfunction is not begun.

Examples

Displays the prompt First in the CIW. Enter point p1. The prompt changes to “Next.” Enter p2 and p3.

procedure(donePoints( w done pts)
if( done then
printf("Points = %L\n" pts)
else
println("Point entry aborted.")
)
)
enterPoints(
?prompts list("First" "Next") ?doneProc "donePoints")
applyEnterFun( )

The enterfunction is not terminated, the prompt changes back to “First,” and “Points = ( p1 p2 p3 )” is printed out. Now enter points p4, p5, and p6, followed by

finishEnterFun( )

The enterfunction is terminated, the prompt goes away, the message “Points = ( p4 p5 p6 )” is printed out, and ( p4 p5 p6 ) is returned.

Related Topics

User Entry Functions


Return to top
 ⠀
X