Re: XtRemoveTimeOut() with value of 0 accvios under 7.3-2, but not
- From: Hoff Hoffman <hoff-remove-this@xxxxxx>
- Date: Thu, 11 May 2006 19:51:57 GMT
Z wrote:
Hoff Hoffman wrote:
Hoff, checking for a non-zero value will not guarantee that the timer is valid; it might be uninitialized data or the code might not have set it back to 0 after calling XtRemoveTimeOut().
Yes. (Without intending any offense, that much is obvious; that there
are (probably) 2^32-1 wrong answers (or however big XtIntervalId is declared), and one answer that's almost certainly always wrong (0), if there's just one timer outstanding? :-) Pointers and context blocks are like that -- bad I/O channel numbers are an equivalent construct on OpenVMS. Short of carnal knowledge of what's in the target structure or the particular meaning of the context value -- something that's certainly an inviting approach, but generally also not a good idea to know about for reasons of upward-compatibility -- there's often no way to verify these sorts of structures.
Is there a function I can call to validate the timer?
If I knew of one, I'd tell you.
If I'm going to change this code, I want to change it *once* and do it *correctly*. If there's a function available to validate, then I should be calling *that*.
When I can establish the correctness of all possible inputs, then I will have reached spiritual perfection. (Sorry, having a bit of a Zen moment there. :-) Perfection and correctness are not something that can be easily reached in a non-trivial environment -- if at all. Much like any good calculus function, you have to decide how much you are willing to pay for how close you get to perfection, and the closer you get, the more it all costs. X Windows has generally chose to be rather more cavalier about this sort of thing. In this case, I'd certainly look for the zero value (and punt that), and I'd look at how I stored and managed the context values within the application.
Jeez.
I'm not trying to make this difficult.
I know of no way to provide what you want within the context of X Windows, short of rebuilding the whole X Windows platform. If Fred or I knew of a call that immediately solved this, we'd have certainly told you about it.
.
- References:
- XtRemoveTimeOut() with value of 0 accvios under 7.3-2, but not under 7.1-2
- From: Z
- Re: XtRemoveTimeOut() with value of 0 accvios under 7.3-2, but not under 7.1-2
- From: davidc
- Re: XtRemoveTimeOut() with value of 0 accvios under 7.3-2, but not
- From: George Cook
- Re: XtRemoveTimeOut() with value of 0 accvios under 7.3-2, but not
- From: Z
- Re: XtRemoveTimeOut() with value of 0 accvios under 7.3-2, but not
- From: Hoff Hoffman
- Re: XtRemoveTimeOut() with value of 0 accvios under 7.3-2, but not
- From: Z
- XtRemoveTimeOut() with value of 0 accvios under 7.3-2, but not under 7.1-2
- Prev by Date: Re: SGI files for chapter 11
- Next by Date: Re: SGI files for chapter 11
- Previous by thread: Re: XtRemoveTimeOut() with value of 0 accvios under 7.3-2, but not
- Next by thread: Re: XtRemoveTimeOut() with value of 0 accvios under 7.3-2, but not
- Index(es):
Relevant Pages
|