From: tommc@hpcvusj.cv.hp.com (Tom McFarland)
Subject: Re: Mysterious beeping
Nntp-Posting-Host: hpcvusj.cv.hp.com
Reply-To: tommc@cv.hp.com
Organization: Hewlett Packard UTD-Corvallis
Lines: 41

In article <C5qtKK.wp@cup.hp.com>, defaria@cup.hp.com (Andy DeFaria) writes:
|> [ Article crossposted from hp.windows ]
|> [ Author was Andy DeFaria ]
|> [ Posted on Mon, 19 Apr 1993 18:08:38 GMT ]
|> 
|> For some reason the following code causes my X application to beep whenever I
|> intercept a keystroke and change it's meaning.  The intent of this code it to
|> allow "date" fields the following special keys:
|> 
|> 	[Tt]:	Insert today's date
|> 	[+=]:	Bump day up by one
|> 	[-_]:	Bump day down by one
|> 
|> I hardcoded some dates for this example.  Perhaps I shouldn't be using an
|> XmText field for this.
|> 
|> ////////////////////////////////////////////////////////////////////////////// 
|> // 
|> // For some reason the following code beeps whenever any of the special keys
|> // of [Tt+=-_] are hit.  Why?  The idea of this code is to interpret these
|> // keys having the special meaning implied by the code.  I would like to get
|> // rid of the beeping but, as far as I can tell, I'm not doing the beep and 
|> // am at a lose as to understanding who and why the beeping is occuring.
|> // 
|> ////////////////////////////////////////////////////////////////////////////// 


code deleted...

>From the XmTextField man page (during discussion of resources):

   XmNverifyBell

      Specifies whether a bell will sound when an action is reversed
      during a verification callback.

You are setting doit to false in the callback, and Text[Field] is beeping
as it should.  To turn off this behavior, set this boolean resource to false.

Tom McFarland
<tommc@cv.hp.com>
