🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #23860

XtTimerCallbackProc documentation

#23860
From: Guy Cox
Date: Tue, 18 Jun 1991 22:14
42 lines
2199 bytes
I have discovered an inconsistency in the documentation for XtTimerCallbackProc. In the O'Reilly Volume 4 page 229 there is a "Notice that the timeout function is called with only one argument, client_data. The xtertis example is implemented this way. In Volume 5 the Reference manual page 321 the function is
shown with two parameters client_data and the id of the timer.

XtTimerIntervalId is defined in Intrinsic.h as an unsigned long. When the
timer is created I print the value. In the timer_proc which is called when
the timer expires I again print the value. It doesn't match.

On top of this it doesn't appear that I am able to have more than 1 timer 
active at a given time. In this application I am trying to provide an error
message to the user if a query to a database server has not been serviced within the specified time interval. I create a widget which will eventually display the results, send the query and set the timer. When two queries overlap the second query bashes the first query..

So what reference in O'Reilly is correct ?
 

and 

Is there anything dumb being done here ?

  case 'a' :
    sscanf(buf,"%1c-%5s ",flag,label);
    printf("adding a widget %s\n",label);
    dest = (WDEST *)malloc(sizeof dest);
    dest->w = make_a_dialog(label);
    dest->timer = XtAddTimeOut(10000L,timer_callback,label);
    printf("the timer id is %d\n",dest->timer);
    AddWidget(dest,wlp);
    break;
  case 'd':
    printf("deleting a widget\n");
    sscanf(buf,"%1c-%d",flag,&wid);
    printf("Widget id %d\n",wid);
    break;

-- 
//
// Why do we park on our driveways, drive on our parkways ?
//

Guy O. Cox, Jr.  
Software Productivity Consortium.
2214 RockHill Rd
Herndon, VA 22090
Technical Details
Message-ID: <1991Jun18.221428.654@software.org>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mcnc!uvaarpa!software.org!cox

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mcnc!uvaarpa!software.org!cox
From: cox@sun.software.org (Guy Cox)
Newsgroups: comp.windows.x
Subject: XtTimerCallbackProc documentation
Message-ID: <1991Jun18.221428.654@software.org>
Date: 18 Jun 91 22:14:28 GMT
Sender: usenet@software.org (Usenet News/Mail Support)
Distribution: usa
Organization: Software Productivity Consortium, Herndon, Virginia
Lines: 42
Originator: cox@sun