Newsgroups: comp.windows.x
Path: cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!bb3.andrew.cmu.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!europa.eng.gtefsd.com!howland.reston.ans.net!usc!sdd.hp.com!hp-cv!hp-pcd!hpcvusn!hpcvusj.cv.hp.com!tommc
From: tommc@hpcvusj.cv.hp.com (Tom McFarland)
Subject: Re: Mysterious beeping
Message-ID: <1993Apr20.153701.112@hpcvusn.cv.hp.com>
Sender: nobody@hpcvusn.cv.hp.com (Nobody - UID must be 99999)
Nntp-Posting-Host: hpcvusj.cv.hp.com
Reply-To: tommc@cv.hp.com
Organization: Hewlett Packard UTD-Corvallis
References:  <C5qtKK.wp@cup.hp.com>
Date: Tue, 20 Apr 1993 15:37:01 GMT
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>
