Re: [Vala] gnome-desktop usage..
- From: "Travis Watkins" <amaranth ubuntu com>
- To: "Shawn Ferris" <shawnmferris yahoo com>
- Cc: Vala List <Vala-list gnome org>
- Subject: Re: [Vala] gnome-desktop usage..
- Date: Wed, 27 Feb 2008 22:59:08 -0600
On Wed, Feb 27, 2008 at 10:44 PM, Shawn Ferris <shawnmferris yahoo com> wrote:
> Here scope of var di ends which shadows the DesktopItem di.
I was sure I sent a reply to everyone, but apparently not..
I had actually considered that.. this was only one of many attempt to get it to work.
One of my previous attempts was written:
DesktopItem di;
try {
di = new DesktopItem.from_file(
"test.desktop",
DesktopItemLoadFlags.ONLY_IF_EXISTS
);
} catch(GLib.Error err) {
message( err.message );
}
if ( di != null ) {
message( di.get_string("Name") );
}
and this behaves the same. I've even tried moving the message/get_string
into the try block itself, and no go. (di is still null and no errors are thrown)
Is there something else I'm missing?
Appreciate it!
Shawn
Why not just use GKeyFile from glib? One less dependency and only
slightly more work (you have to tell it you want the "Desktop Entry"
group).
--
Travis Watkins
http://www.realistanew.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]