Success 1 Re: XForms: Pixmaps need callbacks ?

Matthew Flax (flatmax@cse.unsw.EDU.AU)
Wed, 20 Aug 1997 01:49:01 +1000 (EST)

To subscribers of the xforms list from Matthew Flax <flatmax@cse.unsw.EDU.AU> :

Hooray,

I now have pixmaps updated regularly via a forked process's pipe
communication, using "fl_add_io_callback".
The problem was all along a child / parent forking problem.

I now have two other problems which I thought someone might have come
across before, which once solve should produce a new sound app. for
maximal enjoyment of all :

a] Again small pixmap problems ...
i] One of the colours displayed is incorrect, it is a pink
and should be a deep blue. I've tried using the
colourcloseness function with r,g and b set to 0 but no
help, this colour is still wrong.
ii] I have twelve pixmaps, all very similar, and I load each
of them from a file into an array of Pixmaps like so :
static Pixmap * Pixs; // In the header file
Pixs = new Pixmap[12];

fl_set_pixmap_file(fd_gui->object_one, filename_one);
Pixs[0] = fl_get_pixmap_pixmap(fd_gui->object_one, Pixs, 0);
fl_set_pixmap_file(fd_gui->object_two, filename_two);
Pixs[1] = fl_get_pixamp_pixmap(fd_gui->object_two, Pixs, 0);
... and so on twelve times

I never free the pixmaps and it seems that the updates work ok, by
using the fl_set_pixmap_pixmap function,
however there is the problem of the one colour being wrong as well
as the fact that Pixs[0] = Pixs[9], for no apparent reason.
Is this a correct method for tagging pixmaps for use ?
Is there a better way ?
Hows abouts freeing ?

b] I have a reallly odd error when initialising a form from the c
generated code of fdesign. You see I have several forms and I
first initialise one and it's c++ class (no forking involved)
next I try to initialise the next form using :
form = create_form_form();
Surprisingly this call fails, I use gdb to find that the error is :
__libc_malloc (bytes=Cannot access memory at address 0x38.)
so I edit the create_form_form fdesign generated function, and find
where the error is, after editing this error out, I still find the
same malloc error, again at address 0x38, only with the function
called following the edited out one !
I don't quite understand 'cos the error happens about half way
through the create_form function ?

any help would be helping, thanks
Matt

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