Path: utzoo!attcan!uunet!samsung!sdd.hp.com!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!netnews.upenn.edu!eniac.seas.upenn.edu!corry From: corry@eniac.seas.upenn.edu (Chris Corry) Newsgroups: comp.windows.x Subject: Calling Actions from Actions Message-ID: <38437@netnews.upenn.edu> Date: 28 Feb 91 00:51:51 GMT Sender: news@netnews.upenn.edu Reply-To: corry@eniac.seas.upenn.edu (Chris Corry) Organization: University of Pennsylvania Lines: 57 * PLEASE, PLEASE HELP * I've got a problem that I cannot think of an acceptable solution to. Let me preface this by saying that I DO NOT WANT TO SUBCLASS THE ATHENA TEXT WIDGET (unless I absolutely have to, of course). That said, here we go. I'm writing a hypertext application with links embedded in the text of a normal Xaw text widget. The link is delimited by special characters (EX: "some text << link >> and so on"). I need a way to capture the backspace key (easy enough, write an action and place it in the translation table), check to see if the character about to be erased is a link (easy enough using the programmatic interface supplied with the text widget), and if it IS, jump to one of my functions without propogating the event to "delete-previous-char" (which is really function DeleteBackwardChar). However, if the character about to be erased IS NOT part of the link I want to let it go through. What I've Tried: I didn't think it would work but I wrote an action (MyDeleteChar) and replaced the "delete-previous-char" action with it. Then I tried to directly call DeleteBackwardChar (found in the private widget code) from my action if needed. As you might expect my link ended like this: >%make -fhypermake >cc -c utils.c -o utils.o >cc -c filemenu.c -o filemenu.o >cc -c optmenu.c -o optmenu.o >cc -c fntmenu.c -o fntmenu.o >cc -c athmenu.c -o athmenu.o >cc -c buttons.c -o buttons.o >cc -c doc.c -o doc.o >cc -c lists.c -o lists.o >cc -c engine.c -o engine.o >cc -c smanage.c -o smanage.o >cc -c hypertex.c -o hypertex.o >cc utils.o filemenu.o optmenu.o fntmenu.o athmenu.o buttons.o doc.o lists.o en >gine.o smanage.o hypertex.o -o hypertex libfwf.a libDir.a -lXaw -lXmu -lXt -lX >11 >ld: Undefined symbol > _DeleteOrKill >make: *** [hypertex] Error 2 >% The only other thing I can think of is subclassing the widget and rewriting DeleteBackwardChar but, although I've become fairly proficient at X, I've never written a widget and I can't really afford the time right now. PLEASE REPLY BY POSTING OR MAIL -- ANY HELP WILL BE GREATLY APPRECIATED!!! ======= Thanks ---------------------------+-------------------------------------------------- Chris Corry | //====// //=== //|| // //|| // Home University of Pennsylvania | //====// //=== // || // // || // on the corry@eniac.seas.upenn.edu | // //=== // ||// // ||// Range ---------------------------+--------------------------------------------------