Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ncar!ico!auto-trol!marbru From: marbru@auto-trol.com (Martin Brunecky) Newsgroups: comp.windows.x.motif Subject: Re: Subclassing XmText Message-ID: <1991Jun10.193532.7183@auto-trol.com> Date: 10 Jun 91 19:35:32 GMT References: Sender: news@auto-trol.com Distribution: comp Organization: Auto-trol Technology Corporation Lines: 29 Nntp-Posting-Host: server_1-gw In article pierson@encore.com (Dan L. Pierson) writes: >Suddenly, I need to subclass my first widget. XmText yet! The good >news is that a trivial subclass will do to start. What I absolutely >need is a new class name to hang a different set of translations off >of. > Normally very trivial. You make copy of the public and private header files, add your subclass records. You make a copy of the .c file with the class definition, copy the existing intialization replacing everything inheritable with ...Inherit. Really easy. But in the case of XmText I'd be nervous. Many much simpler widgets don't like subclassing - just because it has not ever been tried, and there are bugs and assumptions that would pop up on the first attempt to subclass. Actually, in XUI (Motif orgin) they did subclass the Text widget, so the chances are it's not so bad. But - beware. But many people would rather replace translations using app-defaults file(s). Less coding -). -- =*= Opinions presented here are solely of my own and not those of Auto-trol =*= Martin Brunecky marbru%auto-trol@sunpeaks.central.sun.com (303) 252-2499 (better avoid: marbru@auto-trol.COM ) Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404