Re: XForms: problem using fl_set_xyplot_alphaxtics

From: James D. Stegeman (stegeman@grc.nasa.gov)
Date: Mon Jun 11 2001 - 15:39:23 EDT

  • Next message: spl@eggshell.ucsd.edu: "Re: XForms: problem using fl_set_xyplot_alphaxtics"

    Steve,

    Thanks for your suggestion. The version you site, 0.89.6 fixed this problem.
    However,
    when we click on a button to get a menu (a form menu, not a pop-up), xforms
    0.89.6
    doesn't like something we are doing and, well, we crash. Version 0.88.1 works
    fine
    for the menuing stuff, but doesn't like the fl_set_xyplot_alphatics (which is
    solved in 0.89.6).

    Any idea on what has changed between these versions that might account for
    this?

    Any lead would be appreciated.

    Thanks,

    Jim Stegeman

    Steve Lamont wrote:

    > # To subscribers of the xforms list from Steve Lamont <spl@ncmir.ucsd.edu> :
    >
    > # To subscribers of the xforms list from Steve Lamont <spl@ncmir.ucsd.edu> :
    >
    > > I am trying to display a begining time string and a end time string on a
    > > plot as shown in the following figure using
    > > fl_set_xyplot_alphaxtics("xx:xx:xx|yy:yy:yy").
    > >
    > > | |
    > > xx:xx:xx yy:yy:yy
    > >
    > > I have encountered two problems:
    > >
    > > 1. The fl_set_xyplot_alphaxtics() seems to interfere with the
    > > fl_set_xyplot_xbounds(). ...
    >
    > Works for me. The following example works with version 0.89.6:
    >
    > #include <stdio.h>
    > #include <math.h>
    > #include <stdlib.h>
    >
    > #include <forms.h>
    >
    > typedef struct {
    > FL_FORM *try;
    > void *vdata;
    > char *cdata;
    > long ldata;
    > FL_OBJECT *xyplot;
    > } FD_try;
    >
    > FD_try *create_form_try( void )
    >
    > {
    >
    > FL_OBJECT *obj;
    > FD_try *fdui = (FD_try *) fl_calloc(1, sizeof(*fdui));
    >
    > fdui->try = fl_bgn_form(FL_NO_BOX, 460, 290);
    > obj = fl_add_box(FL_FLAT_BOX,0,0,460,290,"");
    > fdui->xyplot = obj = fl_add_xyplot(FL_NORMAL_XYPLOT,30,40,410,210,"");
    > fl_end_form();
    >
    > fl_adjust_form_size(fdui->try);
    > fdui->try->fdui = fdui;
    >
    > return fdui;
    >
    > }
    >
    > int main( int argc, char **argv )
    >
    > {
    >
    > FD_try *fd_try;
    > float x[61];
    > float y[61];
    > int i;
    >
    > fl_initialize(&argc, argv, 0, 0, 0);
    > fd_try = create_form_try();
    >
    > fl_set_xyplot_xbounds( fd_try->xyplot, 0.0, 60.0 );
    > fl_set_xyplot_alphaxtics( fd_try->xyplot,
    > "5:12:00@0.0|5:13:30@60.0",
    > NULL );
    >
    > for ( i = 0; i <= 60; i++ )
    > y[i] = sin( ( x[i] = i ) / 60 * 2.0 * M_PI );
    > fl_set_xyplot_data( fd_try->xyplot,
    > x, y, 61,
    > "Foo",
    > "Bar",
    > "Baz" );
    >
    > fl_show_form(fd_try->try,FL_PLACE_CENTERFREE,FL_FULLBORDER,"try");
    > fl_do_forms();
    > return 0;
    >
    > }
    >
    > spl
    > _________________________________________________
    > 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://world.std.com/~xforms
    > List Archive: http://bob.usuhs.mil/mailserv/list-archives/
    > _________________________________________________
    > 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://world.std.com/~xforms
    > List Archive: http://bob.usuhs.mil/mailserv/list-archives/

    --
    -------------------------------------------------------------------------------
    

    James D. Stegeman | This space for rent: NASA Glenn Research Center | Lewis Field | 21000 Brookpark Rd. MS 142-4 | Phone: 1-216-433-3389 Cleveland, Ohio 44135 | Fax: 1-216-433-8000 | e-mail: stegeman@grc.nasa.gov -------------------------------------------------------------------------------

    _________________________________________________ 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://world.std.com/~xforms List Archive: http://bob.usuhs.mil/mailserv/list-archives/



    This archive was generated by hypermail 2b29 : Mon Jun 11 2001 - 15:47:59 EDT