Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcsun!unido!ztivax!tumuc!guug!fidelio From: fidelio@guug.UUCP (Michelle Nelson) Newsgroups: comp.windows.x Subject: Defining Callbacks from resource files Keywords: Callbacks Type Conversion Message-ID: <38@guug.UUCP> Date: 18 Dec 89 19:04:02 GMT Sender: root@guug.UUCP Organization: GUUG e.V., Munich, W. Germany Lines: 27 Hello. I am having a problem setting up callback functions from a resource file. I would like to be able to choose which function is called from a particular menu item at run time and not compile it into the program. The error which I get when trying to use the following resource file definition Fbmenu*menu_item1*select: (* purchasing)() or this resource file definition Fbmenu*menu_item1*select: purchasing is: X Toolkit Warning: No type converter registered for 'String' to 'Callback' conversion. I know that the select resource wants a pointer to a function and that this is a string. There doesn't seem to be a converter from string to pointer... I am using the hp widgets and toolkit. Please let me know if you have any suggestions. (i.e. if I am being unreasonable about defining callbacks at runtime...) I am a relative newcomer to X windows programming. (e-mail would be greately appreciated as I am worried I would miss the response on the newsgroup.) Michelle Nelson