I am coding a browser like interface, and want to use a choice for the
history list, but I want a maximum on the number of choices. If a user's
history is bigger that.. say 5 choices, I want to delete the oldest choice
before I append the newest one. Is there any way to do this? I have
tried the following, but it causes a core dump when I delete for the
second time. It's almost as if once I delete choice 1, the index 1 is
deleted and then the lowest choice index is 2. I would hope this is not
the case.
/*---- add the file to history list ---- */
if (fl_get_choice_maxitems(main_window->c_link) >= 5)
fl_delete_choice(main_window->c_link, 1);
fl_addto_choice(main_window->c_link,
fl_get_input(main_window->i_file) );
/*---- load the file into browser ---- */
Thanks a lot for the time,
Jeff Drost
_________________________________________________
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/xforms-archive/