XForms: dynamically adding objects

malone@mrgone.com
Wed, 21 Jul 1999 18:26:49 +0000 (GMT)

# To subscribers of the xforms list from malone@mrgone.com :

hi,
I'm writing an application that requires me to dynamically add objects
to a form. This works fine until I attempt to remove the objects from
the form. I have the objects (pixmaps) stored in a structure that is
reallocated when a new image is added (in order to add a new entry).
all other information is transferring perfectly. for some reason the
xforms objects can't be accessed after they are added to the form. I
get the following error when I attempt to delete one:
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 62 (X_CopyArea)
Resource id in failed request: 0x4400053
Serial number of failed request: 1140
Current serial number in output stream: 1414

This leads me to believe that the object is not being properally copied
into the structure.
the structure looks like this:
struct image_entry{
int x;
int y;
RImage *image; /*this is the data type used in libwraster from
windowmaker*/
FL_OBJECT *pix;
};

I've tried everything I can think of to get this to work, but it always
gives me that error. I'd attach the code but it currently stands at
about 1000 lines. if you can help, I'd be greatfull.

-- 
====================================================
Tim Malone
Asst. Forum Manager
The OS Forum
http://computingcentral.com/forums/os
====================================================

_________________________________________________ To unsubscribe, send the message "unsubscribe" to xforms-request@bob.usuhs.mil or see http://bob.usuhs.mil/mailserv/xforms.html XForms Home Page: http://bragg.phys.uwm.edu/xforms List Archive: http://bob.usuhs.mil/mailserv/list-archives/