Path: utzoo!attcan!uunet!wuarchive!mailrus!purdue!bu-cs!bloom-beacon!XEROX.COM!JAlred.ElSegundo From: JAlred.ElSegundo@XEROX.COM Newsgroups: comp.windows.x Subject: HP TextEdit widget question Message-ID: <890901-232848-1868@Xerox> Date: 31 Aug 89 17:33:17 GMT Sender: daemon@bloom-beacon.MIT.EDU Reply-To: JAlred.ElSegundo@xerox.com Organization: The Internet Lines: 48 I am having a hard time getting a file up in a HP TextEdit widget. When the XtNsourceType is XwstringSrc, things work fine; but when XtNsourceType is XwdiskSrc, I crash and burn in XtCreateManagedWidget for the TextEdit widget. Any help I could get on this would be greatly appreciated... Jim Alred #include #include #include #include #include struct WindowData { Widget topLevel; Widget fileSW; } windowData; char logFile[100] = "/tmp/junk"; static Arg topLevelArg[] = { {XtNallowShellResize, (XtArgVal)True}, }; static Arg fileSWArg[] = { {XtNwidth, (XtArgVal)300}, {XtNheight, (XtArgVal)250}, {XtNfile, (XtArgVal)logFile}, /* {XtNsourceType, (XtArgVal)XwstringSrc}, */ {XtNsourceType, (XtArgVal)XwdiskSrc}, }; main(argc, argv) int argc; char **argv; { windowData.topLevel = XtInitialize("top", "Top", NULL, 0, &argc, argv); XtSetValues(windowData.topLevel, topLevelArg, XtNumber(topLevelArg)); windowData.fileSW = XtCreateManagedWidget("fileSW", XwtexteditWidgetClass, windowData.topLevel, fileSWArg, XtNumber(fileSWArg)); XtRealizeWidget(windowData.topLevel); XtMainLoop(); }