Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ncar!ico!attc!marbru From: marbru@attc.UUCP (Martin Brunecky) Newsgroups: comp.windows.x Subject: Re: how to change the name of a widget Message-ID: <931@attc.UUCP> Date: 14 Dec 90 18:08:20 GMT References: <49269@seismo.CSS.GOV> <9012131714.AA12875@excess.lcs.mit.edu> Reply-To: marbru@auto-trol.UUCP (Martin Brunecky) Organization: Auto-trol Technology, Denver Lines: 31 In article <9012131714.AA12875@excess.lcs.mit.edu> converse@EXPO.LCS.MIT.EDU writes: > > >> 2.) Is there a (semi-elegant) way to change the name (widget->core->name) >> of a widget that has been created. I could possibly do the change > >As a rule, application programmers should not access fields of the widget >data structure. Changing this field will not be effective in changing >..... Well, he can also change the xrm_name ..... But first of all, WHY anybody wants to do that ? May be there is some (better or easier) way to accomplish THAT than changing the instance *name*. The widget *name* (or better xrm_name as objects do NOT store the name string) is used at widget creation time to retrieve resources from Xrm database. Then it is used by XtNameToWidget. It may be used in some other instances as well ... for example, Label widgets tend to use this name as a default string. I think that changing the name goes into the same bag as reparenting widgets. Technically, it can be done, but it feels too close to a kluge to justify doing it. -- =*= Opinions presented here are solely of my own and not those of Auto-trol =*= Martin Brunecky {...}sunpeaks!auto-trol!marbru (303) 252-2499 (sometimes also: marbru@auto-trol.COM ) Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404