[Gtk-sharp-list] Tomboy build problem: "Gtk.TargetList has no constructors"

Alex Graveley alex at beatniksoftware.com
Thu Jun 9 13:38:27 EDT 2005


I have no idea about Ted's problem, so forwarding to gtk-sharp-list to 
get some thoughts.  Both Gtk# trunk and 1.0.x seem to have the needed 
IntPtr constructor for Gtk.TargetList... does anyone know what is up?

I've already got workarounds for TargetList's binary incompatibilities 
between Gtk# versions in place... the code in question is below.


public NoteEditor (Gtk.TextBuffer buffer)
	: base (buffer)

	// Set extra editor drag targets supported (in addition
	// to the default TextView's various text formats)...
	//// Gtk.TargetList list = Gtk.Drag.DestGetTargetList (this);

	IntPtr list_ptr = gtk_drag_dest_get_target_list (this.Handle);
	Gtk.TargetList list = new Gtk.TargetList (list_ptr);

	list.Add (Gdk.Atom.Intern ("text/uri-list", false), 0, 1);
	list.Add (Gdk.Atom.Intern ("_NETSCAPE_URL", false), 0, 1);

// FIXME: Gtk# broke compatibility at some point with the
// methodref for DestGetTargetList.  We invoke it manually so
// our binary will work for everyone.
static extern IntPtr gtk_drag_dest_get_target_list (IntPtr raw);

Ted, can you try updating from mono 1.1.4 to a more recent version? 
It's a longshot but it might help.


ted leslie wrote:
> gtk-sharp is 1.0-4.1    so i guess that might be it
> my versions of gtk? and mono are below
> linux:/usr/tomboy/tomboy-0.3.2 # rpm -a -q |grep gtk
> gtkspell-2.0.5-58.1
> gtk-qt-engine-0.5-9.1
> libgtkhtml-2.6.1-3.1
> python-gtk-2.2.0-3.1
> gtk-devel-1.2.10-882.1
> gtk-sharp-1.0-4.1
> gtkspell-devel-2.0.5-58.1
> gtk-1.2.10-882.1
> gtk2-2.4.9-10.1
> gtk2-devel-2.4.9-10.1
> linux:/usr/tomboy/tomboy-0.3.2 # rpm -a -q |grep mono
> mono-devel-1.1.4-1.ximian.10.1
> mono-core-1.1.4-1.ximian.10.1
> linux:/usr/tomboy/tomboy-0.3.2 #
> On Thu, Jun 09, 2005 at 12:55:28AM -0700, Alex Graveley wrote:
>>This is very strange.  What version of Gtk# (and mono) do you have 
>>installed?  It looks like the constructor being used is still available 
>>in both Gtk# 1.0.x and 1.1.x, unless it has changed very recently.
>>ted leslie wrote:
>>>i installed the latest gtk2, and pango, atk ... etc all the latest and the 
>>>did configure ok and installed everything it wanted there, (like 
>>>panelapplet, etc)
>>>but in Tomboy dir where is makes the CS files  i get
>>>Gtk.TargetList  .... it can't find ?
>>>i have compiled and run other mono apps without problem, so i am a bit 
>>>wondering why the issue here.
>>>any help/ideas as to what i can check would be appretiated.
>>>make[1]: Entering directory `/usr/tomboy/tomboy-0.3.2/Tomboy'
>>>mcs -g -o Tomboy.exe -target:exe -define:DEBUG -unsafe   
>>>-define:OLD_GTKSPELL Tomboy.cs Applet.cs Note.cs NoteManager.cs 
>>>NoteWindow.cs NoteBuffer.cs PluginManager.cs Preferences.cs 
>>>RecentChanges.cs Search.cs Tray.cs Trie.cs Undo.cs Utils.cs Watchers.cs 
>>>XKeybinder.cs panelapplet/AppletFactory.cs panelapplet/BonoboUIVerb.cs 
>>>panelapplet/PanelApplet.cs panelapplet/generated/BackgroundType.cs 
>>>panelapplet/generated/FactoryCallback.cs panelapplet/generated/Flags.cs 
>>>panelapplet/generated/PanelAppletSharp.voidObjectBackgroundTypeColorObjectSignal.cs panelapplet/generated/PanelAppletSharp.voidObjectDirectionTypeSignal.cs panelapplet/generated/PanelAppletSharp.voidObjectuintSignal.cs Defines.cs -r:/usr/li
>>b/mono/gtk-sharp/glib-sharp.dll -r:/usr/lib/mono/gtk-sharp/pango-sharp.dll 
>>-r:/usr/lib/mono/gtk-sharp/gconf-sharp-peditors.dll   -r:Mono.Posix  
>>>Tomboy.cs(86) warning CS0618: 'Mono.Posix.Syscall' is obsolete: 'Syscall 
>>>is unmaintained.  Please use Mono.Unix.Syscall.'
>>>Tomboy.cs(87) warning CS0618: 'Mono.Posix.Syscall' is obsolete: 'Syscall 
>>>is unmaintained.  Please use Mono.Unix.Syscall.'
>>>NoteWindow.cs(34) error CS0143: The type 'Gtk.TargetList' has no 
>>>constructors defined
>>>NoteWindow.cs(36) error CS0165: Use of unassigned local variable `list'

More information about the Gtk-sharp-list mailing list