Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!apollo!uhura.cc.rochester.edu!ub!zaphod.mps.ohio-state.edu!usc!srhqla!quad1!carl From: carl@quad1.quad.com (Carl Priddy) Newsgroups: comp.windows.x.motif Subject: text widget beeps Keywords: text,beep,widget Message-ID: <4c38a13d.20b6d@apollo.HP.COM> Date: 15 Aug 90 17:17:00 GMT Sender: root@apollo.HP.COM Organization: Quadratron Systems Inc, Thousand Oaks Ca Lines: 35 Resent-From: nazgul@alphalpha.com (Kee Hinckley) e-Id: <9008151936.AA01289@alphalpha.com> To: comp-windows-x-motif@rutgers.edu Resent-To: motif-tmp@alphalpha.com Resent-Date: Wed, 15 Aug 90 15:36:28 EDT Hello, For those of you concerned about flaky text widget actions, here is a response I received from someone who actually bought the source! carl. Hi, I read your question concerning Motif Text Widget beeps. I dont have any experience with Text Widgets in particular (I'll soon get some :-), but as its very challenging to debug such a big... thing..., here's what I see: I see the "real" Text is accessed via some kind of object, pointed to by widget.text.source. Source has Methods, just like a widget. One of them, "Replace", it is the basic function for modifying text. Replace calls the ModifyVerifyCallback to check whether it may alter the text, with reason XmCR_MODIFYING_TEXT_VALUE. If that callback fails (doit is set to false), the whole thing returns EditReject. Replace is called by Routines from TextIn.c. The Calls look like this: if ((*widget->text.source->Replace)(widget->text.source, from, to, &text) != EditDone) { XBell(XtDisplay(widget), 42); } -- and that's why it beeps. You say: the text may not be modified; ok, so the user must have made an ERROR! Terrible thing! Beeeep!!! :-) I guess there is no way to turn this off. Oh well, as you already noticed the text widget is of no use as a "real" editor anyway... Sigh. :-) Jutta Degener