when-timer-expired [message #452193] |
Tue, 20 April 2010 09:53 |
adrianavillota
Messages: 13 Registered: April 2010 Location: ecuador
|
Junior Member |
|
|
I am using the trigger When-timer-expired and he is producing a negative effect in the text boxes
If the timer expires in one second, then the text box flashes every second
If the timer expires in one minute, the box starts to flash every minute.
is like that cool.
I would like to help please, thanks.
When the trigger-new-form-instance I have the following code.
DECLARE
Li_Pantalla Pls_Integer;
Lt_Reloj_Id Timer;
BEGIN
Li_Pantalla: = GET_WINDOW_PROPERTY (FORMS_MDI_WINDOW, WINDOW_HANDLE)
WIN_API_SESSION.TIMEOUT_START_TIMER (Li_Pantalla)
- Find watch, if you delete it.
Lt_Reloj_Id: = Find_Timer ('TIEMPO_INACTIVIDAD');
IF NOT Id_Null (Lt_Reloj_Id) THEN
DELETE_TIMER (Lt_Reloj_Id)
END IF;
- Create a watch and repeats every second starting from scratch.
Lt_Reloj_Id: = Create_Timer ('TIEMPO_INACTIVIDAD', 1000, REPEAT);
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
In the trigger-timer-expired When I have the following:
DECLARE
Lt_Reloj_Id Timer;
Ln_Inactividad Number;
Lv_Usuario VARCHAR2 (80);
Lv_Clave VARCHAR2 (80);
Lv_Base VARCHAR2 (80);
Ln_Valida Number;
Li_Pantalla Pls_integer;
Begin
Lt_Reloj_Id: = Find_Timer ('TIEMPO_INACTIVIDAD');
IF NOT Id_Null (Lt_Reloj_Id) THEN
Ln_Inactividad: = Win_api_session.Timeout_Get_Inactive_Time;
Ln_Inactividad IF> = 10 THEN Then
MESSAGE ('The end of your session'); SYNCHRONIZE;
LOGOUT;
Win_API_Session.timeout_delete_timer;
DELETE_TIMER (Lt_Reloj_Id)
END IF;
END IF;
EXCEPTION
WHEN OTHERS THEN
EXIT_FORM (NO_VALIDATE)
END;
CM: changed font back from bold/purple and added code tags.
[Updated on: Tue, 20 April 2010 10:08] by Moderator Report message to a moderator
|
|
|
Re: when-timer-expired [message #452195 is a reply to message #452193] |
Tue, 20 April 2010 10:14 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
1) Don't post in large font.
2) Don't post in purple (or any other colour - black is more readable)
3) Please use code tags
4) Read the posting guidelines.
I've fixed up your post because it hurt my eyes but I don't want to have to do so again.
5) I'm not sure what your problem is exactly.
EDIT: had to fix me own tags.
[Updated on: Tue, 20 April 2010 10:15] Report message to a moderator
|
|
|
|
|
Re: when-timer-expired [message #452198 is a reply to message #452197] |
Tue, 20 April 2010 10:38 |
adrianavillota
Messages: 13 Registered: April 2010 Location: ecuador
|
Junior Member |
|
|
I give you an example:
ADRIANA I will write in a textbox
then I start to write ADRI
and continued to write ANA
I can only end ANA
That's why I say that the text boxes on my form is cool, that is because l When-timer-expired.
Please help, I'm beginning ...
|
|
|
|
Re: when-timer-expired [message #452203 is a reply to message #452193] |
Tue, 20 April 2010 10:53 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
I don't know what word you should use to describe that behaviour but "cool" is the wrong one.
Anyway - I suspect the problem is the syncronize.
In the WHEN-TIMER-EXPIRED trigger replace this:
MESSAGE ('The end of your session'); SYNCHRONIZE;
With this:
MESSAGE ('The end of your session', ACKNOWLEDGE);
And see what happens.
|
|
|
|
Re: when-timer-expired [message #452205 is a reply to message #452193] |
Tue, 20 April 2010 11:06 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Did you remove the syncronize from the code?
I've never done user timeout in forms, but if I was I would probably use timers as I can't think of any other way of doing it.
I wouldn't set the timer to 1 second though. I'd set it a lot higher - 15 minutes or similar. Every second will consume way too many resources and inactivity timeouts really don't need to be that accurate.
|
|
|
Re: when-timer-expired [message #452206 is a reply to message #452205] |
Tue, 20 April 2010 11:11 |
adrianavillota
Messages: 13 Registered: April 2010 Location: ecuador
|
Junior Member |
|
|
thanks for responding.
And if you remove synchronize;
But he indicated that I increased the timer to one minute (60000) but the case with the difference that the effect is no longer every second if not every minute.
thanks
|
|
|
|
Re: when-timer-expired [message #452543 is a reply to message #452419] |
Thu, 22 April 2010 09:19 |
adrianavillota
Messages: 13 Registered: April 2010 Location: ecuador
|
Junior Member |
|
|
Thank you for responding Mr David,
I've made the changes in the When-new-form-instance and when-expired-timer and I could not control this negative effect on the text boxes.
The changes made in the When-new-form-instance and when-timer-expired, not whether it is correct.
I'm a beginner need help, thanks.
------------Changes ------------------
ENTER;
next_field;
previous_field;
---------------
place that trigger the end of each please tell me if it is correct.
thank you very much.
att: Adrianne...
[Updated on: Thu, 22 April 2010 10:10] Report message to a moderator
|
|
|
|
Re: when-timer-expired [message #453433 is a reply to message #452543] |
Wed, 28 April 2010 23:55 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Does your code compile?
Put 'message;pause;' pairs into your code to see what is happening. Try running the form using the debugger.
Test what happens when you only have 'enter'. Is there data in the field?
Then what happens when you do 'next_field'?
Then what happens when you do 'previous_field'?
Do you have 'Keep Cursor Position' set to 'Yes' for the item that you are testing?
David
|
|
|