XForms: Problem with freeobject coords in v0.88

Rob (robin@cs.curtin.edu.au)
Fri, 16 Jan 1998 09:08:06 +0800

To subscribers of the xforms list from Rob <robin@cs.curtin.edu.au> :

Hi,

I have struck a possible problem in upgrading to v0.88 from 0.86 (SGI
Irix 5.3). The only change I made is for a free object that I was
adding manually under 0.86 to be now included using fdesign (as free
objects are supported in fdesign of 0.88). It is behaving normally
(i.e., I am getting FL_ENTER events when the mouse enters the area, and
it recognises FL_PUSH etc) but when I came to plot something in the area
I discovered the coords seem to be wrong. It wouldn't plot because the
x coord it was getting from the freeobject was incorrect.

E.g., the add_free command generated from fdesign is:

fdui->plotfreeobj = obj =
fl_add_free(FL_NORMAL_FREE,760,90,190,310,"",
freeobj_plotfreeobj_handle);

and this is consistent with what I was doing manually in v0.86, but the
following command issued in the handler:

printf("ob->x=%d ob->y=%d ob->w=%d ob->h=%d \n",
ob->x,ob->y,ob->w,ob->h);

produces
x=90 y=190 w=310 h=3

Somehow the values have changed (note width and height are incorrect
too), but as mentioned earlier, not in terms of detecting events etc. I
can get around the problem by hardcoding in the offset of 760 for
plotting but would like to find the solution if possible.

Hope someone can help.

Cheers
Rob

-- 
Robin Hosie                |  robin@cs.curtin.edu.au  
Curtin Uni,WA,Australia    |  http://www.cs.curtin.edu.au/~robin
----------------------------------------------------------------------
I doubt therefore I might be. <anon>
======================================================================
_________________________________________________
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://bloch.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/