From: John Darrington Date: Wed, 16 Dec 2009 20:52:17 +0000 (+0100) Subject: Linear Regression: Dependent variables should not be strings. X-Git-Tag: fc11-i386-build59^0 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cded1cb84dcf229aa26fa474e52e69109557d83a;p=pspp-builds.git Linear Regression: Dependent variables should not be strings. Prevent the gui from selecting string variables as the dependent variable in a linear regression procedure, since that's not allowed in such a procedure. --- diff --git a/src/ui/gui/regression-dialog.c b/src/ui/gui/regression-dialog.c index 070d30a6..53010c3f 100644 --- a/src/ui/gui/regression-dialog.c +++ b/src/ui/gui/regression-dialog.c @@ -238,6 +238,7 @@ regression_dialog (GObject *o, gpointer data) GtkWidget *stat_button = get_widget_assert (xml, "stat-button"); GtkWidget *save_button = get_widget_assert (xml, "save-button"); + GtkWidget *dep_selector = get_widget_assert (xml, "dep-selector"); rd.stat_view = get_widget_assert (xml, "stat-view"); @@ -258,6 +259,7 @@ regression_dialog (GObject *o, gpointer data) rd.dep_vars = GTK_TREE_VIEW (dest_dep); rd.indep_vars = GTK_TREE_VIEW (dest_indep); + psppire_selector_set_allow (PSPPIRE_SELECTOR (dep_selector), numeric_only); rd.save_dialog = get_widget_assert (xml, "save-dialog"); rd.pred_button = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "pred-button"));