Re: XForms: beeping date input

Tano Fotang (M.Tano@Wirtschaft.FH-Wolfenbuettel.DE)
Fri, 17 Oct 1997 13:52:29 -0700

To subscribers of the xforms list from Tano Fotang <M.Tano@Wirtschaft.FH-Wolfenbuettel.DE> :

Dr. T.C. Zhao wrote:

> >I set the cursor to XC_xterm but all i
> >now get is the large black X cursor when the mouse moves
> >into input field.
>
> Can you clarify how you set the cursor to XC_xterm ?
> I tried adding fl_set_cursor(fd_input->input->window, XC_xterm);
> after fl_show_form in inputall.c, everything seems working
> ok. Now this does not mean there is no problem, just that
> I need more info to isolate the problem.

I have traced the problem to the u_ldata member of the multi-
input object. Other objects are fine.
The cursor for object "myObject" is set as follows:

fl_set_object_prehandler(myObject, my_set_cursor);
myObject->u_ldata = (long) XC_xterm; /* let cursor be XC_xterm*/
fprintf(stderr,"%d\n", myObject->u_ldata);
/* value of XC_xterm correctly printed*/

int my_set_cursor(FL_OBJECT * ob, int event,
FL_Coord mx, FL_Coord my, int key, void *xev)
{
switch (event) {
case FL_ENTER:
fprintf(stderr,"%d\n", ob->u_ldata);
/*for multiinput object: 0 printed instead of XC_xterm!
*/
fl_set_cursor(FL_ObjWin(ob), ob->u_ldata);
/*cursor is now a Big X */
return !FL_PREEMPT;
break;
case FL_LEAVE:
fl_reset_cursor(FL_ObjWin(ob));
return !FL_PREEMPT;
break;
default:
return !FL_PREEMPT;
}/*switch*/
}

No problems with xforms 0.87.2; only with 0.87.3 does this occur.
Will switch a few things and see what happens.
Tano Fotang.

-- 
   Genius doesn't work on an assembly line basis.  You can't simply say,
	"Today I will be brilliant."
		-- Kirk, "The Ultimate Computer", stardate 4731.3
_________________________________________________
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/