next up previous contents
Next: trial_data_refresh() Up: Writing the Standard Panel Previous: trial_init()   Contents


trial_read_window()

This routine should read all the information from the window and write it into the data structure initialized by the routine trial_init(). See Section 3.2.5.3 for more details.

/*
 * trial_read_window()
 *
 * routine to read data from all items in the trial window
 */
int
  trial_read_window()
{
  int i, n_varb;
  char *strng;
  double atof();

  /* if no window, then nothing to read */
  if (trial_ip == NULL) return;

  n_varb = *((int *) pm(GET, Traj_Ds_Object, Varb_Dim, NULL));

  /* read text fields */
  for (i=0; i<n_varb; i++)
    {
      strng = (char *) xv_get(trial_ip->varb_value[i], PANEL_VALUE);
      trial_varb_value[i] = atof(strng);
    }

  /* read setting item */
  trial_choice = xv_get(trial_ip->setting1, PANEL_VALUE);
}



root
1998-11-02