[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

2344.0. "Problem with XtAddTimeOut" by MASTIC::FARRELL (Money, there is no substitute!) Fri Feb 23 1990 14:16

Hello,

I have a problem with XtAddTimeOut procedure.  I did the following :


main()
{
/* Init all windows, create widget to come up on screen */

	XtAddTimeOut(10000,MY$PROCEDURE,0);

	XtMainLoop();
}

MY$PROCEDURE()
{
   printf("We are in the timer callback procedure...\n");

   XtAddTimeOut(10000,MY$PROCEDURE,0);
}


------

Well, this print statement is never being issued.  I have also tried
XtAddAppTimeOut and had the same problem.

Could someone tell me what I am doing wrong?

thanks in advance,

		$$$$ ted $$$$

T.RTitleUserPersonal
Name
DateLines
2344.1May be this?STU01::BGEISELHARTMon Feb 26 1990 06:052
    Just a question, how did You declare Your CallbackProcedure?
    Bianca 
2344.2missing ApplicationContext parameter ...VMSDEV::KRIEGERMon Feb 26 1990 15:0619
    
    
    You have a missing parameter ... you need to add the applicationcontext
  
    code below should answer your question --- has nothing to do with how
    you define MY$PROCEDURE ....
    
    	jim ... remember programing in decwindows is fun .,..
    
    
    toplevel_object = XtInitialize ( "  ", "  ",	NULL, 0, &argc, &argv);

    XtRealizeWidget (toplevel_object);

    
    XtAppAddTimeOut( XtWidgetToApplicationContext( toplevel_object ),
			10000, MY$PROCEDURE , 0 );	

 
2344.3apologies needed?MASTIC::FARRELLMoney, there is no substitute!Mon Feb 26 1990 16:3417
    
My, my, RE: .2, so quick to judge.  You were incorrect.

>   You have a missing parameter ... you need to add the applicationcontext

This is done automatically for you by XtAddTimeOut (It just calls 
XtAppAddTimeOut with the default context).

>   code below should answer your question --- has nothing to do with how
>   you define MY$PROCEDURE ....
    
It had everything to do with this.  After I declared MY$PROCEDURE as
type XtTimerCallbackProc everything worked fine.

Thank you RE: .1

	$