Cicode Programming Reference > Cicode Function Categories > Page Functions Introduction > PageTask

PageTask

PageTask() is used for running preliminary Cicode before displaying a page in a window. It makes it possible for the same Cicode to be run if the page is re-entered by navigating forward or back. PageTask() is similar to TaskNew().

PageTask() returns a handle to a code task the first time it is run. The custom Cicode of the sFunctionName parameter needs to call PageDisplay() in order to display the page. When the page changes, the function and its parameters will be pushed onto the Page History stack. The Cicode fnTask will be called again when the page is navigated to using the PageForward or PageBackward functions.

Syntax

PageTask(iWinNum, sFunctionName, sFunctionArg)

iWinNum:

The Window number of the window in which to display the page.

sFunctionName:

String representing the Cicode function to run each time the page is navigated to using the forward and backward navigation functions.

sFunctionArg:

String representing the parameters to use with function fnTask.

Return Value

A handle to a code task the first time it is run. BAD_HANDLE (-1) if the function did not complete.

Related Functions

PageBack, PageForward

Example

FUNCTION MyTrendDisplay(INT Area)
		ConfigurePens(area)
		PageDisplay("MyTrendPage")
END

See Also

Page Functions