[Vala] Can not get dbus obejct ObjectPath propertie ?
- From: "G.S.Alex" <sthots gmail com>
- To: vala-list gnome org
- Subject: [Vala] Can not get dbus obejct ObjectPath propertie ?
- Date: Sun, 24 Jan 2010 23:26:29 +0800
Here is a same code :
----------------------------------------
using DBus ;
int main(){
DBus.Connection dbus_con = DBus.Bus.get(DBus.BusType.SYSTEM);
dynamic DBus.Object nm = dbus_con.get_object
("org.freedesktop.NetworkManager",
"/org/freedesktop/NetworkManager",
"org.freedesktop.NetworkManager");
ObjectPath[unowned] devices_path = nm.GetDevices();
for (int i = 0 ; i < devices_path.length ; i++ ){
string path = devices_path[i];
dynamic DBus.Object device = dbus_con.get_object
("org.freedesktop.NetworkManager",
path,
"org.freedesktop.NetworkManager.Device");
message(device.Interface); //this works fine.
ObjectPath ip4conf_path = device.Ip4Config ;
}
return 0;
}
----------------------------------------
got this error:
(process:10987): GLib-GObject-CRITICAL **: g_value_get_string:
assertion `G_VALUE_HOLDS_STRING (value)' failed
I can get the ObjectPath propertie in d-feet via python ,so is this a
bug of vala?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]