-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support (Gtk) tree-store:* #85
Comments
Thanks for the report. I'll see what I can do. |
Added pull request. In order to test: (tree-store:new (vector G_TYPE_LONG)) btw: I'm pretty sure that GI said that this function requires two arguments--but it doesn't work if I put two arguments. Not saying that I want to explicitly specify the number of elements, but it's just something notable. |
After that, What does exist: But when I do (tree1.scm:16667): GuileGI-ERROR **: 19:28:45.219: unhandled argument type 'pointer to GtkTreeModel of type GInterface or NULL' src/gig_argument.c:250 That's because It should do something like I added it to my pull request. |
Even though the following functions should have the following prototypes, actually using them as one would in C does not work (
I think that might be because the implicit conversion into GValue is not done? If it was done, it would be done using The workaround Using |
For setting values of integer type, perhaps |
For making typed bytevectors, core Guile provides the family of functions |
For |
Ohhh! Thanks! The following indeed does work:
The following doesn't work and doesn't give an error:
And I can't for the life of me successfully call Also, G_TYPE_STRING is missing. |
Added |
|
|
Thanks! <string> does indeed work and is nicer! Is there something else in Guile for |
There sadly is no scheme equivalent to Lines 823 to 832 in c8908fd
|
Also doesn't work as it should:
The model used is a Error message (when hovering over a row):
I suspect that's because the returned Also, that might be a guile thing, but wouldn't it be possible to, on error messages like "No applicable method", to list all those methods of that generic that are present? I mean it knows those, right? That would help a lot. |
You can [roughly] inspect GOOPS methods by doing the following: (use-modules (ice-9 pretty-print)
(oop goops)
(srfi srfi-1))
(let* ((methods (generic-function-methods YOUR-FUNCTION))
(formals (map method-formals methods))
(specializers (map method-specializers methods)))
(pretty-print (map (lambda (a b) (if (pair? a) (zip a b) (list a b))) formals specializers))) You might encounter a few issues with improper lists, e.g. As for the specific issue with (apply peek 'expected (method-specializers (car (generic-function-methods tree-model:get-value!)))
(apply peek 'actual (map class-of (list model iter 1 value))) |
Thanks!
So maybe that's because I'm mixing high-level and low-level constructs? I've been trying to use low-level constructs everywhere--but didn't find the one to make a |
Nah, you're not doing anything wrong here. The For the record, this is a type of behaviour, that for some weird reason I've only been able to observe in Guix environments. I'm hesitant to call it Guix-specific, but something inside Guix seems to exacerbate it. See Lines 751 to 767 in 89babf6
This would probably deserve its own issue somewhere, but I have yet to find out, who is at fault here (us, GI, GLib itself, Guix...) |
For what it's worth, the |
How come? |
They're |
(I'd like to have a method to get the entire tree row at once; |
There is sadly little to be done on our front. |
It's fine--but I thought I should ask. GtkTreeView is badly supported in gobject-introspection, which is worrying because you basically need it any time you show a list. I've fixed so many bugs in upstream gtk+ regarding introspection hints by now. (I wonder whether gtk-rs trusts those hints for lifetime tracking, though O_O) Still, the usual enterprise distros won't have those fixes for years, because they hardly ever update gtk... Compared to the other stuff, missing Oh well. Thanks for having a look, though! |
My personal experience with Gtk/Vala tells me that introspection hints (and vapis) are serious business, so I'd assume some of those bugs make it into Rust. Not that I have too high expectations for Rust anyway. |
From what I gather from the developer blogs, list views and models and associated classes are quite different in Gtk4. Perhaps they will be better supported |
Sorry to necro up this issue, but I need to ask the state of afairs with this. I want to create an application, which critically relies on Is there a way to make TreeView work and dynamically add and remove things shown in it using guile-gi? To me this issue reads like there are issues with it and that it does not work yet (?). |
Well, I can take another look, but, the core problem is that guile-gi only provides functionality that the introspection library provides, and it doesn't provide any exceptional work-arounds except for Cairo. I made a quick example. See this attachment --> gtk-tree-store.scm.txt |
Thank you a lot for making an example. I will try and understand and try to use for my use-case. |
@spk121 Where would be the best place to ask questions about some of the things in that example code? Here in this topic? Or rather a new issue? Or e-mail? |
@ZelphirKaltstahl Email is perfectly fine by me, but if you want to do it on a web site, i enabled the discussions tab in GitHub. I've never used it tho, so I don't know if it is any good |
It would be nice if GtkTreeStore worked.
Current situation:
Gtk+ version is gtk+ 3.24.20.
gir is:
The text was updated successfully, but these errors were encountered: