[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Datasheet internals
From: |
Ben Pfaff |
Subject: |
Re: Datasheet internals |
Date: |
Wed, 13 Jun 2007 21:55:05 -0700 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
John Darrington <address@hidden> writes:
> A more serious problem that I've noticed, is that if I load a data
> file, then do FILE NEW and try to enter new data, after a file I get
>
> src/data/case.c:325: case_data_rw_idx: Assertion `idx <
> c->case_data->value_cnt' failed.
>
> I'm not sure why that is at the moment.
The proximate cause there is that val_cnt is 0, so that
case_data_rw_idx (&cc, 0) tries to access the first value in a
case with no values in it, causing an assertion. That can be
fixed by putting "if (val_cnt > 0)" above the memset call or by
calling case_data_all_rw instead of case_data_rw_idx.
But then it'll just assert at the case_data_rw call in the for
loop a few lines farther down. This is because val_cnt shouldn't
be zero: it should be 1 if you added a new numeric or short
string variable. But the column isn't getting added to the
datasheet. Why? The callback isn't getting fired. Why? One
reason is a misspelling, I think: the code isn't sure whether the
callbacks are named with underscores or hyphens. The following
patch helps a bit:
--- gui.orig/src/ui/gui/psppire-dict.c 2007-06-13 21:45:02.000000000 -0700
+++ gui/src/ui/gui/psppire-dict.c 2007-06-13 21:45:16.000000000 -0700
@@ -110,7 +110,7 @@
object_class->finalize = psppire_dict_finalize;
signals [VARIABLE_CHANGED] =
- g_signal_new ("variable_changed",
+ g_signal_new ("variable-changed",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
0,
@@ -123,7 +123,7 @@
signals [VARIABLE_INSERTED] =
- g_signal_new ("variable_inserted",
+ g_signal_new ("variable-inserted",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
0,
@@ -135,7 +135,7 @@
signals [VARIABLES_DELETED] =
- g_signal_new ("variables_deleted",
+ g_signal_new ("variables-deleted",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
0,
But it doesn't solve the whole problem. One oddity is that
delete_variables_callback doesn't delete any columns from the
datasheet, which it seems that it should, but I don't think
that's the issue here.
--
Ben Pfaff
http://benpfaff.org
- Datasheet internals, John Darrington, 2007/06/11
- Re: Datasheet internals, Ben Pfaff, 2007/06/11
- Re: Datasheet internals, John Darrington, 2007/06/11
- Re: Datasheet internals, Ben Pfaff, 2007/06/12
- Re: Datasheet internals, John Darrington, 2007/06/12
- Re: Datasheet internals, John Darrington, 2007/06/12
- Re: Datasheet internals, Ben Pfaff, 2007/06/13
- Re: Datasheet internals, John Darrington, 2007/06/13
- Re: Datasheet internals, Ben Pfaff, 2007/06/14
- Re: Datasheet internals, John Darrington, 2007/06/14
- Re: Datasheet internals,
Ben Pfaff <=
- Re: Datasheet internals, John Darrington, 2007/06/14
- Re: Datasheet internals, Ben Pfaff, 2007/06/14