This is the mail archive of the guile-gtk@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gtk-clist-append does not work with shared substrings


Marius Vollmer <mvo@zagadka.ping.de> writes:

> "Greg J. Badros" <gjb@cs.washington.edu> writes:
> 
> > That's the same as mine.  I get the same *responses* as you, but the
> > CLIST is not populated with the correct strings.  Try this:
> 
> Ahh, I see.  There are two bugs in guile-gtk that prevent it from
> working.  The first is that no automatic type conversion used for
> composite objects (including the one that takes substrings to normal
> strings), and the second is that guile-gtk accepts substrings as valid
> types but can't deal with them then.
> 
> I have fixed the second bug, so now your example will produce a "Wrong
> type argument" error.  The first bug needs more work and more thought,
> because of memory management issues and of mode `out' parameters.  You
> can work around the first bug by explicitely using string-copy to get
> from a substring to an equal normal string.

Right, that's roughly what I did in Scwm's gtk-table-display.scm.
Fixing the first problem definitely is helpful as it's better than just
failing silently.

> My current thinking is to convert a composite of mode `in' by copying
> it, and one of mode `out' or `inout' by modifying it in place.  Any
> thoughts about this?

I've never achieved a deep understanding of the guile-gtk interface
description stuff, but my naive take on this stuff is that that would be 
sufficient.  You definitely don't want to side-effect an in parameter. 

> > Right-- I may care about which GTk+, but I'm more likely to care about
> > which guile-gtk.  We need both, and only the former is available.
> 
> You can now use gtkconf-guile-gtk-version to get at the guile-gtk
> version.  gtkconf-version will now reflect the version of Gtk+ that is
> actually active.

Great, thanks!

Greg

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]