DELETE_TIMER Built-in
Description
Deletes the given timer from the form.
Syntax
PROCEDURE DELETE_TIMER
(timer_id Timer);
PROCEDURE DELETE_TIMER
(timer_name VARCHAR2);
Built-in Type unrestricted procedure
Enter Query Mode yes
Parameters
- timer_id
-
- Specifies the unique ID that Oracle Forms assigns when it creates the
timer, specifically as a response to a successful call to the CREATE_TIMER
Built-in. Use the FIND_TIMER Built-in to return the ID to an appropriately
typed variable. That data type of the ID is Timer.
-
- timer_name
-
- Specifies the name you gave the timer when you defined it. The data type
of the timer_name is VARCHAR2.
DELETE_TIMER Restrictions
- If you delete a timer, you must issue a FIND_TIMER call before attempting
to call ID_NULL to check on availability of the timer object. For instance,
the following example is incorrect because the call to DELETE_TIMER does not
set the value of the ID. In other words, the timer is deleted, but the ID
continues to exist, yet points to a non-existent timer, hence, it is not null.
Invalid Example:
timer_id := Find_Timer('my_timer');
Delete_Timer(timer_id);
IF (ID_Null(timer_id))...
DELETE_TIMER Examples
/*
** Built-in: DELETE_TIMER
** Example: Remove a timer after first checking to see if
** it exists
*/
PROCEDURE Cancel_Timer( tm_name VARCHAR2 ) IS
tm_id Timer;
BEGIN
tm_id := Find_Timer( tm_name );
IF NOT Id_Null(tm_id) THEN
Delete_Timer(tm_id);
ELSE
Message('Timer '||tm_name||' has already been cancelled.');
END IF;
END;