timer related problem /form cursor keep refreshing [message #604228] |
Thu, 26 December 2013 08:15 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/179476.png) |
jgjeetu
Messages: 373 Registered: July 2013 Location: www.Orafaq.com/Forum
|
Senior Member |
![jgjeetu@gmail.com](/forum/theme/orafaq/images/google.png)
|
|
i have one form and there is a tab canvas with 5 tab pages.
1st tab page is for welcome screen
there are three items , current date ,current time and logged in user (item type is text_item for all)
i have created timer for continuos change of time
and the timer type is repeat .
Now the problem is
when i navigate to other tab pages the cursor keep refreshing on other pages too.
thats why i am having a problem in selecting the data from combo_box type items
Please tell me how to handle this.
[Updated on: Thu, 26 December 2013 08:17] Report message to a moderator
|
|
|
|
|
|
|
|
Re: timer related problem /form cursor keep refreshing [message #604335 is a reply to message #604328] |
Sat, 28 December 2013 15:52 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/1229663c86eb1a441385fe710cd9116e?s=64&d=mm&r=g) |
mughals_king
Messages: 392 Registered: January 2012 Location: pakistan
|
Senior Member |
|
|
PROBLEM IS SOLVED
Dear corrected your fmb why you used on block-level
when-new-block-instance------------TOTALLY WRONG CODE-----
declare
t timer;
begin
t:=create_timer('t1',1000,repeat);
end;
select sysdate into :welcome.date from dual;
NULL;
-----------------------------------------
NOW CORRECT WAY TO SOLVE THIS PROBLEM
WHEN-NEW-FORMS-INSTANCE----TRIGGER
select sysdate into :welcome.date from dual;
DECLARE
CurrTime TIMER;
OneSec CONSTANT NUMBER := 1000;
BEGIN
CurrTime := CREATE_TIMER('CURRTIME',OneSec,REPEAT);
END;
WHEN-TIMER-EXPIRED------TRIGGER
DECLARE
ExpTimer VARCHAR2(40) := Get_Application_Property(TIMER_NAME);
vTime VARCHAR2(30):= :SYSTEM.CURRENT_DATETIME;
BEGIN
IF ExpTimer = 'CURRTIME' THEN
Welcome.TIME := SUBSTR(vTime, instr(vTime,' ')+1);
END IF;
END;
See this corrected fmb file download this
Regard
Mughal
[Updated on: Sat, 28 December 2013 15:55] Report message to a moderator
|
|
|
|
|
Re: timer related problem /form cursor keep refreshing [message #604347 is a reply to message #604337] |
Sun, 29 December 2013 03:19 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/179476.png) |
jgjeetu
Messages: 373 Registered: July 2013 Location: www.Orafaq.com/Forum
|
Senior Member |
![jgjeetu@gmail.com](/forum/theme/orafaq/images/google.png)
|
|
![http://www.mediafire.com/convkey/5467/9euxk8bphqj7xrqfg.jpg](http://www.mediafire.com/convkey/5467/9euxk8bphqj7xrqfg.jpg)
![/forum/fa/11512/0/](/forum/fa/11512/0/)
![http://www.mediafire.com/convkey/4dd4/gxqm1qhds6rj128fg.jpg](http://www.mediafire.com/convkey/4dd4/gxqm1qhds6rj128fg.jpg)
MUGHAL BRO AS YOU SEE IN THESE PICS, THIS IS THE SCREENSHOT WHICH I TAKEN AFTER RUNNING YOUR.FMB FILE ,THE CURSOR IS STILL REFRESHING
SO THE PROBLEM STILL EXISTS.
& I DONT KNOW MUCH HOW TO USE TIMER , I JUST SAW AN 1 MINUTE VIDEO OVER YOUTUBE THAT TOO WITHOUT AUDIO ,JUST TOOK IDEA FROM THAT AND USED IN MY PROJECT TO DISPLAY THE CONTINUOS CHANGE OF TIME, SO PLEASE EXPLAIN WHATS THE PURPOSE AND USES OF TIMER
AND THIS CODING ALSO:-
WHEN-TIMER-EXPIRED------TRIGGER
DECLARE
ExpTimer VARCHAR2(40) := Get_Application_Property(TIMER_NAME);
vTime VARCHAR2(30):= :SYSTEM.CURRENT_DATETIME;
BEGIN
IF ExpTimer = 'CURRTIME' THEN
Welcome.TIME := SUBSTR(vTime, instr(vTime,' ')+1);
END IF;
END;
-
Attachment: 2.jpg
(Size: 141.80KB, Downloaded 1859 times)
[Updated on: Sun, 29 December 2013 07:30] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Re: timer related problem /form cursor keep refreshing [message #604452 is a reply to message #604419] |
Mon, 30 December 2013 13:50 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.gravatar.com/avatar/1229663c86eb1a441385fe710cd9116e?s=64&d=mm&r=g) |
mughals_king
Messages: 392 Registered: January 2012 Location: pakistan
|
Senior Member |
|
|
Why not brother,
Timers correspond to internal clocks which have a specific time period When the specified duration expires the timer can either perform an action once and stop or repeat the action regularly every time the timer expires timer duration is always in milliseconds timers are created using the CREATE_TIMER built in and require a WHEN-TIMER-EXPIRED trigger to be written at the form level this trigger fires every time the timer expires.
as we created a display item "CURRENT_TIME" in your case "Time" This item shows the time in HH24:MI:SS format and updates itself every second the timer duration
In the WHEN-NEW-FORM-INSTANCE trigger created a timer named CURRTIME which iterates after every one second and populates the CURRENT_TIME / TIME item with the system date in HH24:MI:SS format the code is as i already posted.
Hope you got something.
Regard
Mughal
[Updated on: Mon, 30 December 2013 13:59] Report message to a moderator
|
|
|