GO_BLOCK in WHEN-VALIDATE-ITEM trigger ... [message #80744] |
Thu, 14 November 2002 22:29  |
Hien Chung
Messages: 10 Registered: October 2002
|
Junior Member |
|
|
Hope someone could help me solve the problem. Thanks.
I have a GO_BLOCK('ABC') in my when-validate-item trigger. This is a restricted package procedure so I am getting an error message like 'Illegal restricted procedure .....'. But this is what I want my WVI trigger to do.
The code looks like
IF X = 5 THEN
GO_BLOCK('ABC');
ELSE
DO SOMETHING ELSE;
END IF;
I tried these two steps below:
1/ I tried to catch the error in ON-ERROR trigger.
IF ERRNUM = 40737 THEN NULL;
It does suppress the error message; however, it does not put the cursor to the block ABC, rather,it puts the cursor to the next item in the same block.
2/ In the exception handler of the when-validate-item trigger, I have
exception
when form_trigger_failure then
raise;
when others then
null;
end;
It still does not solve the problem.
|
|
|
|
Re: GO_BLOCK in WHEN-VALIDATE-ITEM trigger ... [message #80747 is a reply to message #80744] |
Fri, 15 November 2002 01:37   |
Hien Chung
Messages: 10 Registered: October 2002
|
Junior Member |
|
|
Hi
Thanks for your reply. But the problem is key-next-item will not fire when you use the mouse to navigate out of the item. This is exactly what I am trying to solve. I am converting the character based application to GUI version. In the old version, they put all the navigational logic in key-next-item because there is no mouse navigation. Now, when converting I have to account for mouse navigation too. When-validate-item trigger will fire whether you use the mouse or the keyboard to navigate out of the item.
|
|
|
Re: GO_BLOCK in WHEN-VALIDATE-ITEM trigger ... [message #80750 is a reply to message #80744] |
Fri, 15 November 2002 14:16  |
fokker
Messages: 18 Registered: March 2002
|
Junior Member |
|
|
This is not always good, and can sometimes lead to other problems, but you can always create a timer to execute code that is "restricted". Basically, you create a timer, that you fire off instead of the Go_Block procedure. In the WHEN-TIMER-EXPIRED Trigger, you check the name of the timer, and if the timer is the one you are expecting, you can execute all the restricted procedures you want.
|
|
|