[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Possible bug in guile-gtk-tree-model implementation
From: |
Stanislas Pinte |
Subject: |
Possible bug in guile-gtk-tree-model implementation |
Date: |
Thu, 22 Mar 2007 10:44:28 +0100 |
User-agent: |
Thunderbird 1.5.0.10 (Windows/20070221) |
Hello,
I think that there is a bug in the guile-gtk-tree-model implementation,
in the guile_gtk_generic_tree_model_get_iter function (see code below)
I implemented a custom model in guile, with filtering capabilities. When
I update my filter, and when the row count falls down to 0 (I.e. my
filter filters out all elements), I get this error:
test-filtered-model.scm:109:5: (application):
guile_gtk_generic_tree_model_get_value: assertion `iter->user_data !=
NULL' failed
However, I have the impression my model is doing what it should:
If I have 3 elements, upon updating my filter, my model calls
(row-deleted model (list source-index))
three times.
After that, the GtkTreeView tries to retrieve the first iter:
on-get-iter path: (0)
get-iter-at-index index 0
My custom model returns #f, because the path (0) is not visible anymore.
It may be a problem with the following lines in
guile_gtk_generic_tree_model_get_iter implementation:
if (SCM_NFALSEP (scm_ret)) {
SET_ITER_VAL (iter, scm_ret);
return TRUE;
} else {
SET_ITER_NULL (iter);
return FALSE;
}
--> if scm_ret is #f, can I be sure that SCM_NFALSEP will return false?
I wonder anyway why would the GtkTreeView try to retrieve the path (0)
if it has seen 3 row-deleted events...
Thanks in advance for your help ,
Stan.
- Possible bug in guile-gtk-tree-model implementation,
Stanislas Pinte <=