Hello,
while trying to figure out how the dbus support in elev8 works I noticed
that the example is out of date. I've attached a patch that fixes the UI
logic of the example, but unfortunately it still aborts whenever dbus is
used.
I tried with require("dbus") and similar to no avail.
Regards,
Daniel
>From 5ced21d389bf4a9a22a2af0ca34c8d66cb5bd366 Mon Sep 17 00:00:00 2001
From: Daniel Willmann <[email protected]>
Date: Wed, 15 Aug 2012 17:27:47 +0100
Subject: [PATCH] elev8: Fix the UI logic of dbus_test.js
With this patch the dbus_test UI shows again. However, the dbus
functions are still not working and will cause an exception. I don't
know why.
Signed-off-by: Daniel Willmann <[email protected]>
---
trunk/PROTO/elev8/data/javascript/dbus_test.js | 44 ++++++++++--------------
1 file changed, 19 insertions(+), 25 deletions(-)
diff --git a/trunk/PROTO/elev8/data/javascript/dbus_test.js b/trunk/PROTO/elev8/data/javascript/dbus_test.js
index 2ef1087..8de52bf 100644
--- a/trunk/PROTO/elev8/data/javascript/dbus_test.js
+++ b/trunk/PROTO/elev8/data/javascript/dbus_test.js
@@ -5,48 +5,42 @@ var FILL_BOTH = { x : -1.0, y : -1.0 };
var interface;
-var my_window = new elm.window({
+var my_window = elm.Window({
type : "main",
label : "D-Feet Demo",
width : 320,
height : 480,
align : FILL_BOTH,
elements : {
- the_background : {
- type : "background",
+ the_background : elm.Background({
weight : EXPAND_BOTH,
align : FILL_BOTH,
resize : true,
- },
- the_box : {
- type : "box",
+ }),
+ the_box : elm.Box ({
weight : EXPAND_BOTH,
resize : true,
elements : {
- the_entry : {
- type : "entry",
+ the_entry : elm.Entry({
weight : EXPAND_BOTH,
align : FILL_BOTH,
line_wrap : 3,
editable : false,
- },
- the_bus : {
- type : "entry",
+ }),
+ the_bus : elm.Entry({
text : "org.freedesktop.DBus",
weight : EXPAND_BOTH,
align : FILL_BOTH,
- },
- the_buttons : {
- type : "box",
+ }),
+ the_buttons : elm.Box({
weight : EXPAND_BOTH,
horizontal : true,
resize : true,
elements : {
- fdo : {
- type : "button",
+ fdo : elm.Button({
label : "System Bus : UPower",
weight : { x : -1.0, y : -1.0 },
- on_clicked : function() {
+ on_click : function() {
print("Button Clicked");
var test = new dbus("System");
test.on_introspect= function(args){
@@ -58,17 +52,15 @@ var my_window = new elm.window({
},
test.introspect("org.freedesktop.UPower", "/org/freedesktop/UPower");
},
- },
- bz : {
- type : "button",
+ }),
+ bz : elm.Button({
label : "Session Bus : BlueZ",
weight : { x : -1.0, y : -1.0 },
- on_clicked : function() {
+ on_click : function() {
print("Button Clicked");
var test = new dbus("Session");
test.on_introspect= function(args){
my_window.elements.the_box.elements.the_bus.text = arguments[0];
- my_window.elements.the_box.elements.the_bus.text = arguments[0];
print("Test Interfaces " + arguments[1][0]);
print("Test Interfaces " + arguments[1][1]);
print("Test Interfaces " + arguments[1][2]);
@@ -79,10 +71,12 @@ var my_window = new elm.window({
},
test.introspect("org.freedesktop.Notifications", "/org/freedesktop/Notifications");
},
- },
+ }),
},
- },
+ }),
}
- },
+ }),
},
});
+
+var e = elm.realise(my_window);
--
1.7.9.5
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel