OSDN Git Service

Version 0.6.55, working uinode.listen(...)!
[pettanr/clientJs.git] / 0.6.x / js / main.js
index aa91895..ae31769 100644 (file)
@@ -1,4 +1,4 @@
-PageRoot(\r
+root = PageRoot(\r
        Box({\r
                width   : '10%',\r
                height  : '10%',\r
@@ -23,19 +23,24 @@ PageRoot(
                        borderColor : 0x111111,\r
                        borderWidth : [ 0, 0, 0, 0 ],\r
                        borderStyle : 'solid dotted',\r
-                       padding     : [ 2, 1.5 ],\r
+                       padding     : [ 4, 1 ],\r
                        sizing      : 'border'\r
                },\r
                Box({\r
                        width       : '50%',\r
                        height      : 2,\r
-                       left        : '30%',\r
+                       left        : '25%',\r
                        bgColor     : 0x999999\r
                }),\r
                Text( 'Hello, world!', { width : '100%' } ),\r
                Text( '----------------------------', { width : '100%' } ),\r
-               txt = Text( 'PettanR-team. rrrrrrrrrr', { width : '100%' } )\r
+               text = Text( 'PettanR-team. rrrrrrrrrr', { width : '100%' } )\r
+                       .listen( X.UI.Event.TAP, _onClick )\r
        )\r
 );\r
+_root = X.Class._getPrivate( root );\r
+_text = X.Class._getPrivate( text );\r
 \r
-_text = X.Class._getPrivate( txt );\r
+function _onClick( e ){\r
+       alert( e.type );\r
+};\r