зеркало из https://github.com/mono/mail-archives.git
109 строки
4.6 KiB
HTML
109 строки
4.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Gtk-sharp-list] Gtk.RecentManager: Way to list Items
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Gtk.RecentManager%3A%20Way%20to%20list%20Items&In-Reply-To=">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="009892.html">
|
|
<LINK REL="Next" HREF="009894.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Gtk-sharp-list] Gtk.RecentManager: Way to list Items</H1>
|
|
<B>Nils Andresen</B>
|
|
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Gtk.RecentManager%3A%20Way%20to%20list%20Items&In-Reply-To="
|
|
TITLE="[Gtk-sharp-list] Gtk.RecentManager: Way to list Items">andresen.nils at googlemail.com
|
|
</A><BR>
|
|
<I>Mon Oct 12 02:24:35 EDT 2009</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="009892.html">[Gtk-sharp-list] GIO# System.InvalidCastException in VolumeMonitor.MountAdded event
|
|
</A></li>
|
|
<LI>Next message: <A HREF="009894.html">[Gtk-sharp-list] Gtk.RecentManager: Way to list Items
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#9893">[ date ]</a>
|
|
<a href="thread.html#9893">[ thread ]</a>
|
|
<a href="subject.html#9893">[ subject ]</a>
|
|
<a href="author.html#9893">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>Hi,
|
|
I am currently a little "stuck".
|
|
|
|
I wanted to list all my "Recently Used" Items. I use this code:
|
|
|
|
><i>public static void Main(string[] args)
|
|
</I>><i>{
|
|
</I>><i>   Application.Init ();
|
|
</I>><i> RecentManager rm = RecentManager.Default;
|
|
</I>><i>    GLib.List items = rm.Items;
|
|
</I>><i>    Console.WriteLine(items.Count+" items.");
|
|
</I>><i>    foreach(object item in items)
|
|
</I>><i>    {
|
|
</I>><i>        Console.WriteLine(item.ToString());
|
|
</I>><i>    }
|
|
</I>><i>    Console.WriteLine("Done.");
|
|
</I>><i>    Console.ReadKey();
|
|
</I>><i>}
|
|
</I>
|
|
If the Items-list is empty all works as expected. However if the
|
|
RecentManager does in fact contain Items, I'm getting:
|
|
|
|
><i>3 items.
|
|
</I>><i>Stacktrace:
|
|
</I>><i>
|
|
</I>><i>  at (wrapper managed-to-native) GLib.Object.gtksharp_is_object (intptr) <0x00070>
|
|
</I>><i>  at (wrapper managed-to-native) GLib.Object.gtksharp_is_object (intptr) <0xffffffff>
|
|
</I>><i>  at GLib.Object.IsObject (intptr) <0x00013>
|
|
</I>><i>  at GLib.ListBase.DataMarshal (intptr) <0x003ff>
|
|
</I>><i>  at GLib.ListBase/ListEnumerator.get_Current () <0x0004b>
|
|
</I>><i>  at ruCmd.MainClass.Main (string[]) [0x00038] in /home/nils/Projekte/RecentlyUsed/ruCmd/Main.cs:14
|
|
</I>><i>  at (wrapper runtime-invoke) ruCmd.MainClass.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>
|
|
</I>><i>
|
|
</I>><i>Native stacktrace:
|
|
</I>><i>
|
|
</I>><i>    /usr/bin/mono [0x480c90]
|
|
</I>><i>    /usr/bin/mono [0x4b004d]
|
|
</I>><i>    /lib/libpthread.so.0 [0x7fad5b7c85a0]
|
|
</I>><i>    /usr/lib/libgobject-2.0.so.0(g_type_check_instance_is_a+0x53) [0x7fad55c642e3]
|
|
</I>><i>    [0x41d48b00]
|
|
</I>><i>
|
|
</I>><i>=================================================================
|
|
</I>><i>Got a SIGSEGV while executing native code. This usually indicates
|
|
</I>><i>a fatal error in the mono runtime or one of the native libraries
|
|
</I>><i>used by your application.
|
|
</I>><i>=================================================================
|
|
</I>
|
|
Is there an error in my handling of Gtk#/GLib ? I have already rebuild
|
|
my mono-environment.
|
|
|
|
Yours,
|
|
Nils
|
|
</PRE>
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="009892.html">[Gtk-sharp-list] GIO# System.InvalidCastException in VolumeMonitor.MountAdded event
|
|
</A></li>
|
|
<LI>Next message: <A HREF="009894.html">[Gtk-sharp-list] Gtk.RecentManager: Way to list Items
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#9893">[ date ]</a>
|
|
<a href="thread.html#9893">[ thread ]</a>
|
|
<a href="subject.html#9893">[ subject ]</a>
|
|
<a href="author.html#9893">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">More information about the Gtk-sharp-list
|
|
mailing list</a><br>
|
|
</body></html>
|