summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarry <larry.olj@gmail.com>2016-01-09 00:31:26 +0100
committerCedric BAIL <cedric@osg.samsung.com>2016-01-09 00:31:31 +0100
commit55e66fcbb3b8c9dfd698963cebc15b3694724ab1 (patch)
tree50c1a6cf29687244d40aa88f6b4b0eeb984f5343
parent331bcf7abc1d2fed22f50541ca31c304d7a6abbd (diff)
js: fix examples functions
Summary: update functions in examples @fix Reviewers: cedric, felipealmeida Differential Revision: https://phab.enlightenment.org/D3548 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/examples/box_js_example_02.js10
-rw-r--r--src/examples/bubble_example_01.js4
-rw-r--r--src/examples/button_example_01.js2
-rw-r--r--src/examples/menu_example_01.js4
-rw-r--r--src/examples/radio_example_01.js10
-rw-r--r--src/examples/slider_example.js8
-rw-r--r--src/examples/spinner_example.js4
7 files changed, 21 insertions, 21 deletions
diff --git a/src/examples/box_js_example_02.js b/src/examples/box_js_example_02.js
index 6e76bd11a..63684df02 100644
--- a/src/examples/box_js_example_02.js
+++ b/src/examples/box_js_example_02.js
@@ -38,13 +38,13 @@ bigbox.packEnd(bx);
38bx.setVisible(true); 38bx.setVisible(true);
39 39
40bt = new elm.Elm.Button(win); 40bt = new elm.Elm.Button(win);
41bt.textSet("elm.text", "Add"); 41bt.setText("elm.text", "Add");
42bx.packEnd(bt); 42bx.packEnd(bt);
43bt.setVisible(true); 43bt.setVisible(true);
44bt.on('clicked', _add_cb); 44bt.on('clicked', _add_cb);
45 45
46bt = new elm.Elm.Button(win); 46bt = new elm.Elm.Button(win);
47bt.textSet("elm.text", "Clear"); 47bt.setText("elm.text", "Clear");
48bx.packEnd(bt); 48bx.packEnd(bt);
49bt.setVisible(true); 49bt.setVisible(true);
50bt.on('clicked', _clear_cb); 50bt.on('clicked', _clear_cb);
@@ -57,7 +57,7 @@ bigbox.packEnd(bx);
57bx.setVisible(true); 57bx.setVisible(true);
58 58
59bt = new elm.Elm.Button(win); 59bt = new elm.Elm.Button(win);
60bt.textSet("elm.text", "Button 1"); 60bt.setText("elm.text", "Button 1");
61bx.packEnd(bt); 61bx.packEnd(bt);
62bt.setSizeHintWeight(1.0, 1.0); 62bt.setSizeHintWeight(1.0, 1.0);
63bt.setSizeHintAlign(-1.0, -1.0); 63bt.setSizeHintAlign(-1.0, -1.0);
@@ -65,7 +65,7 @@ bt.setVisible(true);
65bt.on('clicked', _unpack_cb); 65bt.on('clicked', _unpack_cb);
66 66
67bt = new elm.Elm.Button(win); 67bt = new elm.Elm.Button(win);
68bt.textSet("elm.text", "Button 2"); 68bt.setText("elm.text", "Button 2");
69bx.packEnd(bt); 69bx.packEnd(bt);
70bt.setSizeHintWeight(1.0, 0.0); 70bt.setSizeHintWeight(1.0, 0.0);
71bt.setSizeHintAlign(1.0, 0.5); 71bt.setSizeHintAlign(1.0, 0.5);
@@ -73,7 +73,7 @@ bt.setVisible(true);
73bt.on('clicked', _unpack_cb); 73bt.on('clicked', _unpack_cb);
74 74
75bt = new elm.Elm.Button(win); 75bt = new elm.Elm.Button(win);
76bt.textSet("elm.text", "Button 3"); 76bt.setText("elm.text", "Button 3");
77bx.packEnd(bt); 77bx.packEnd(bt);
78bt.setVisible(true); 78bt.setVisible(true);
79bt.on('clicked', _unpack_cb); 79bt.on('clicked', _unpack_cb);
diff --git a/src/examples/bubble_example_01.js b/src/examples/bubble_example_01.js
index 89ee4737b..d7b912b37 100644
--- a/src/examples/bubble_example_01.js
+++ b/src/examples/bubble_example_01.js
@@ -35,9 +35,9 @@ bubble1.on('clicked',
35 { 35 {
36 ++corner; 36 ++corner;
37 if (corner > 3) 37 if (corner > 3)
38 bubble1.pos_set(corner = 0); 38 bubble1.setPos(corner = 0);
39 else 39 else
40 bubble1.pos_set(corner); 40 bubble1.setPos(corner);
41 }); 41 });
42 42
43label2 = new elm.Elm.Label(win); 43label2 = new elm.Elm.Label(win);
diff --git a/src/examples/button_example_01.js b/src/examples/button_example_01.js
index 5f34c112a..a959427c9 100644
--- a/src/examples/button_example_01.js
+++ b/src/examples/button_example_01.js
@@ -2,7 +2,7 @@ efl = require('efl');
2elm = require('elm'); 2elm = require('elm');
3 3
4_btn_options_cb = function(_btn) { 4_btn_options_cb = function(_btn) {
5 var text = _btn.textGet("elm.text"); 5 var text = _btn.getText("elm.text");
6 var lbl = text.split(": "); 6 var lbl = text.split(": ");
7 7
8 var t = parseFloat(lbl[1]); 8 var t = parseFloat(lbl[1]);
diff --git a/src/examples/menu_example_01.js b/src/examples/menu_example_01.js
index 9e3170fe8..5ddf9cb12 100644
--- a/src/examples/menu_example_01.js
+++ b/src/examples/menu_example_01.js
@@ -17,7 +17,7 @@ menu_it = menu.itemAdd(null, "mail-reply-all", "second intem", null, null);
17 17
18menu.itemAdd(menu_it, "object-rotate-left", "menu 1", null, null); 18menu.itemAdd(menu_it, "object-rotate-left", "menu 1", null, null);
19button = new elm.Elm.Button(win); 19button = new elm.Elm.Button(win);
20button.textSet("elm.text", "button - delete items"); 20button.setText("elm.text", "button - delete items");
21menu_it1 = menu.itemAdd(menu_it, null, null, null, null); 21menu_it1 = menu.itemAdd(menu_it, null, null, null, null);
22menu_it1.setPartContent(null, button); 22menu_it1.setPartContent(null, button);
23 23
@@ -32,6 +32,6 @@ menu_it = menu.itemAdd(null, null, "third item", null, null);
32menu_it.setDisabled(true); 32menu_it.setDisabled(true);
33 33
34menu.setVisible(true); 34menu.setVisible(true);
35rect.on('mouse_down', function(){menu.visible_set(true)}); 35rect.on('mouse_down', function(){menu.setVisible(true)});
36win.setSize(250, 350); 36win.setSize(250, 350);
37win.setVisible(true); 37win.setVisible(true);
diff --git a/src/examples/radio_example_01.js b/src/examples/radio_example_01.js
index ac91c2c41..380b0940f 100644
--- a/src/examples/radio_example_01.js
+++ b/src/examples/radio_example_01.js
@@ -2,7 +2,7 @@
2elm = require('elm'); 2elm = require('elm');
3 3
4_cb = function(obj){ 4_cb = function(obj){
5 console.log(obj.textGet("elm.text"), "state value:", obj.getStateValue()); 5 console.log(obj.getText("elm.text"), "state value:", obj.getStateValue());
6} 6}
7 7
8win = new elm.Elm.WinStandard(null); 8win = new elm.Elm.WinStandard(null);
@@ -16,7 +16,7 @@ win.resizeObjectAdd(bx);
16bx.setVisible(true); 16bx.setVisible(true);
17 17
18radio_g = new elm.Elm.Radio(win); 18radio_g = new elm.Elm.Radio(win);
19radio_g.textSet("elm.text", "Radio 1"); 19radio_g.setText("elm.text", "Radio 1");
20radio_g.setStateValue(1); 20radio_g.setStateValue(1);
21radio_g.setValue(1); 21radio_g.setValue(1);
22ic = new elm.Elm.Icon(win); 22ic = new elm.Elm.Icon(win);
@@ -29,7 +29,7 @@ radio_g.on('changed', _cb);
29radio_g.setVisible(true); 29radio_g.setVisible(true);
30 30
31radio = new elm.Elm.Radio(win); 31radio = new elm.Elm.Radio(win);
32radio.textSet("elm.text", "Radio 2"); 32radio.setText("elm.text", "Radio 2");
33radio.setStateValue(2); 33radio.setStateValue(2);
34radio.groupAdd(radio_g); 34radio.groupAdd(radio_g);
35ic = new elm.Elm.Icon(win); 35ic = new elm.Elm.Icon(win);
@@ -42,7 +42,7 @@ radio.on('changed', _cb);
42radio.setVisible(true); 42radio.setVisible(true);
43 43
44radio = new elm.Elm.Radio(win); 44radio = new elm.Elm.Radio(win);
45radio.textSet("elm.text", "Radio 3"); 45radio.setText("elm.text", "Radio 3");
46radio.setStateValue(3); 46radio.setStateValue(3);
47radio.groupAdd(radio_g); 47radio.groupAdd(radio_g);
48bx.packEnd(radio); 48bx.packEnd(radio);
@@ -52,7 +52,7 @@ radio.on('changed', _cb);
52radio.setVisible(true); 52radio.setVisible(true);
53 53
54radio = new elm.Elm.Radio(win); 54radio = new elm.Elm.Radio(win);
55radio.textSet("elm.text", "Radio 4"); 55radio.setText("elm.text", "Radio 4");
56radio.setStateValue(4); 56radio.setStateValue(4);
57radio.groupAdd(radio_g); 57radio.groupAdd(radio_g);
58bx.packEnd(radio); 58bx.packEnd(radio);
diff --git a/src/examples/slider_example.js b/src/examples/slider_example.js
index e585119d9..a31692a76 100644
--- a/src/examples/slider_example.js
+++ b/src/examples/slider_example.js
@@ -20,7 +20,7 @@ sl.setVisible(true);
20 20
21/* with icon, end and label */ 21/* with icon, end and label */
22sl = new elm.Elm.Slider(win); 22sl = new elm.Elm.Slider(win);
23sl.textSet("elm.text", "Counter"); 23sl.setText("elm.text", "Counter");
24 24
25ic = new elm.Elm.Icon(win); 25ic = new elm.Elm.Icon(win);
26ic.setStandard("home"); 26ic.setStandard("home");
@@ -91,14 +91,14 @@ sl.setVisible(true);
91 91
92sl.on('changed', function(obj) 92sl.on('changed', function(obj)
93 { 93 {
94 val = obj.value_get(); 94 val = obj.getValue();
95 console.log("Changed to " + val); 95 console.log("Changed to " + val);
96 }); 96 });
97 97
98sl.on('delay_changed', function(obj) 98sl.on('delay_changed', function(obj)
99 { 99 {
100 val = obj.value_get(); 100 val = obj.getValue();
101 console.log("Delay changed to " + val); 101 console.log("Delay changed to " + val);
102 }); 102 });
103 103
104win.setVisible(true); 104win.setVisible(true);
diff --git a/src/examples/spinner_example.js b/src/examples/spinner_example.js
index c9d2917da..ab582fda7 100644
--- a/src/examples/spinner_example.js
+++ b/src/examples/spinner_example.js
@@ -78,13 +78,13 @@ sp7.setEditable(true);
78sp7.on('changed', 78sp7.on('changed',
79 function(obj) 79 function(obj)
80 { 80 {
81 console.log("Value changed to " + obj.value_get()); 81 console.log("Value changed to " + obj.getValue());
82 }); 82 });
83 83
84sp7.on('delay_changed', 84sp7.on('delay_changed',
85 function(obj) 85 function(obj)
86 { 86 {
87 console.log("Value delay changed to " + obj.value_get()); 87 console.log("Value delay changed to " + obj.getValue());
88 }); 88 });
89 89
90win.setVisible(true); 90win.setVisible(true);