Path: utzoo!attcan!uunet!husc6!uwvax!astroatc!nicmad!hill From: hill@nicmad.UUCP (Ray Hill) Newsgroups: comp.windows.x Subject: Xtk Resource Converters Keywords: Xtk XtAddConverter Message-ID: <2729@nicmad.UUCP> Date: 24 May 88 21:45:12 GMT Organization: Nicolet Instruments, Biomedical Division Lines: 32 X toolkit Experts: ------------------ Where is the correct place to add resource converters? (ie. XtAddConverter) I tried the "class_initialize" procedure for the widget that uses the new resource type but that is to late. I need the new resource type before creating the first widget of this type. If I try to use the converter before creating the first widget Xt warns: "X Toolkit Warning: No type converter registered for ...". Widgets created after the first one are allowed to use the converter without problems through "XtConvert" . "XtSetValues" also works great by putting the converted values exactly where they are wanted. But telling our application programmers: "Always create a widget of this type and then destroy it before creating any widgets you want to use" is not acceptable. Xt is finding the resource converter when doing default resource stuff. (ie. XtResources and app-defaults stuff) It works since this happens after the "class_initialize" procedure has been called. So far I haven't been able to get Xt to put the defaults into the "Rec" structure though. I know its calling the converter but I haven't found out where its putting my results yet. But hopefully that's a simple bug I track down. Ray Hill (hill@nicmad) (608) 271-3333 X-2103