Comments (8)
I have a problem on the TreeModel too. @gkoz and I took a look but we couldn't find the problem. My problem is on the processus_viewer project. So your help is very welcome ! =D
from gtk.
To reproduce, simply add the following line in the first for loop of the treeview example:
left_model.get_path(&iter);
Could you paste a diff so we would be on the same page here? I'm failing to reproduce this so far. I do have a feeling though that the iterators aren't always handled correctly.
from gtk.
diff --git a/src/treeview.rs b/src/treeview.rs
index 22dc6ef..81ab5ef 100644
--- a/src/treeview.rs
+++ b/src/treeview.rs
@@ -54,6 +54,7 @@ fn main() {
let mut iter = gtk::TreeIter::new().unwrap();
left_store.append(&mut iter);
left_store.set_string(&iter, 0, "I'm in a list");
+ left_model.get_path(&iter);
}
// right pane
from gtk.
@gkoz: I think that's the problem we've got here.
from gtk.
Thanks. Yeah, I see it too.
from gtk.
I think a g_object_ref
is missing somewhere, causing the unwanted destruction of the object.
from gtk.
Reduced failing code:
extern crate glib;
extern crate gtk;
use gtk::traits::*;
fn main() {
gtk::init();
let column_types = [glib::Type::String];
let left_store = gtk::ListStore::new(&column_types).unwrap();
let left_model = left_store.get_model().unwrap();
let mut iter = gtk::TreeIter::new().unwrap();
left_store.append(&mut iter);
left_model.get_path(&iter);
}
I'll try the same in C.
from gtk.
Okay, I guess the pointy hat goes to me for calling g_object_ref
on a type that's not a GObject
. :/
from gtk.
Related Issues (20)
- constants GDK_BUTTON_* missing? HOT 3
- are we sure destroy() is never needed? HOT 9
- What is the best way to make integration tests with GTK? HOT 4
- Include libportal in gtk-rs? HOT 4
- Null pointer panic on `GestureZoom::connect_end` HOT 4
- Crash when touching entry icon HOT 8
- Cannot add new tabs in GtkNotebook HOT 3
- glib and gio compatibility scheme HOT 4
- FileChooserNative memory management issue HOT 4
- Broken requirements URL in README.md HOT 6
- Broken README link
- gtk::PopoverMenu::popup doesn't work for PopoverMenu HOT 4
- Problems with `gtk::Image` update through `Pixbuf` HOT 1
- Using from another package fails on Windows with GLib-GIO-CRITICAL ** This application can not open files. HOT 2
- Pressing the mouse button yields two button events HOT 4
- Building gtk-rs runs out of memory on 2GB device, which I think means compiling any basic graphical app won't work there HOT 18
- GestureDrag does not signal events HOT 1
- Support GTK 4 HOT 2
- Add GtkImageMenuItem support HOT 1
- GLArea and OpenGL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gtk.