[comp.windows.x] XrTextEditor some problem

gaur@uicsrd.UUCP (04/22/87)

	I have some problem with the XrTextEdit() call when a call
to XrInput() follows it ( not necessarily the next statement). Both the calls 
seem to work individually. The error message I get is:
	X Error:	parameter not a Pixmap
			Request code: 42
			Request function: 3
			Request window: 0*3e70061
			Error Serial:	#25
			Current Serial:	#28
 
Can somebody suggest why this could be happening?

fred@hpcvlo.HP.COM (Fred Taft) (05/08/87)

Without additional information, it's difficult to determine why you are
having problems with the text editor.  XrInput() most likely has nothing
to do with the problem; it does, however, do an XFlush(), which would
explain why the X error was appearing at that point.  When an application
makes an Xlib call, the request is not necessarily sent to the server
immediately; it is queued up until either the buffer fills, or the buffer
is flushed.  Needless to say, any call you are making before the call
to XrInput() could be the culprit.

A simple way to determine if the text editor is the problem would be to
place an XFlush() call right before and right after your call which
creates the text editor instance.

Also, have you remembered to do an XrInit() call before creating the
editor?  Did you register the window, using XrInput (MSG_ADDWINDOW)?
If so, did you remember to fill in the xrWindowData structure with the
proper foreground and background tiles?

If the problem still persists, extract the portion of your code which
creates the text editor instance (along with the section showing the
'info' structure for the editor), and post it as a response here;  I'll
look at it at the next available chance.

Fred Taft
Corvallis Workstation Operation
Hewlett-Packard Co