Home » Developer & Programmer » Forms » when-timer-expired (form 6i)
when-timer-expired [message #452193] Tue, 20 April 2010 09:53 Go to next message
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;

Embarassed Embarassed




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 Go to previous messageGo to next message
cookiemonster
Messages: 13938
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 #452196 is a reply to message #452195] Tue, 20 April 2010 10:23 Go to previous messageGo to next message
adrianavillota
Messages: 13
Registered: April 2010
Location: ecuador
Junior Member
you help me?

the problem is focused on the When-timer-expired,
produces a negative effect on my forms (text boxes cool)
how I can correct this
Re: when-timer-expired [message #452197 is a reply to message #452196] Tue, 20 April 2010 10:31 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
adrianavillota wrote on Tue, 20 April 2010 16:23
(text boxes cool)


No idea what that means.
Re: when-timer-expired [message #452198 is a reply to message #452197] Tue, 20 April 2010 10:38 Go to previous messageGo to next message
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 #452201 is a reply to message #452198] Tue, 20 April 2010 10:44 Go to previous messageGo to next message
adrianavillota
Messages: 13
Registered: April 2010
Location: ecuador
Junior Member
Attached image and effect.
previous text is shaded so it is replaced with the last thing typing
  • Attachment: EFECTO.JPG
    (Size: 11.14KB, Downloaded 719 times)
Re: when-timer-expired [message #452203 is a reply to message #452193] Tue, 20 April 2010 10:53 Go to previous messageGo to next message
cookiemonster
Messages: 13938
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 #452204 is a reply to message #452203] Tue, 20 April 2010 11:01 Go to previous messageGo to next message
adrianavillota
Messages: 13
Registered: April 2010
Location: ecuador
Junior Member
Thanks, but same thing keeps happening
take away the message and likewise continues to have the same effect in the text boxes.

Do you think this well implemented session expiration?

or know any different method, that allows me to control the inaction of the users in the application and then proceed to close the application.

Embarassed Sad
Re: when-timer-expired [message #452205 is a reply to message #452193] Tue, 20 April 2010 11:06 Go to previous messageGo to next message
cookiemonster
Messages: 13938
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 Go to previous messageGo to next message
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 #452419 is a reply to message #452206] Thu, 22 April 2010 00:14 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Unfortunately, that is what happens when you have a timer. The screen is refreshed and as the data that you have keyed in, is not yet recognised, it is lost.

Try the following in your timer: do an 'Enter' to pick up any data that has been entered (test that this works), then do a 'next_field' / 'previous _field' (you can find the correct spelling) this will place the cursor at the END of the field instead of highlighting the whole field which would then be over-written by the next keystroke.

David
icon9.gif  Re: when-timer-expired [message #452543 is a reply to message #452419] Thu, 22 April 2010 09:19 Go to previous messageGo to next message
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. Embarassed


------------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

icon9.gif  Help me [message #452966 is a reply to message #452543] Mon, 26 April 2010 11:07 Go to previous messageGo to next message
adrianavillota
Messages: 13
Registered: April 2010
Location: ecuador
Junior Member
Embarassed Embarassed Embarassed
Re: when-timer-expired [message #453433 is a reply to message #452543] Wed, 28 April 2010 23:55 Go to previous message
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
Previous Topic: Migrating Form 6i with 11i Template to R12 Template (merged by CM)
Next Topic: open pdf file from a form
Goto Forum:
  


Current Time: Fri Sep 20 02:20:20 CDT 2024