WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=af5a32d8562fdbe69146410dd2fa8f64abfd9cb3
commit af5a32d8562fdbe69146410dd2fa8f64abfd9cb3 Author: Larry de Oliveira Lira Junior <[email protected]> Date: Thu Dec 10 12:22:07 2015 -0800 Wiki page javascript_tutorial changed with summary [] by Larry de Oliveira Lira Junior --- pages/tutorial/javascript_tutorial.txt | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/pages/tutorial/javascript_tutorial.txt b/pages/tutorial/javascript_tutorial.txt index 0479c96..304abfe 100644 --- a/pages/tutorial/javascript_tutorial.txt +++ b/pages/tutorial/javascript_tutorial.txt @@ -176,18 +176,21 @@ Make a new file stream with ''fs.createWriteStream'', download the image to file For each tweet we make a new Elm.Layout and set a theme using ''setfile'', ''setText'' is used to define a new text to Edje elements in theme. To have a formatted text we used Elm.Entry to main tweet text and added this widget into theme using ''setContent'' layout method <code javascript> - for(i=0; i < tweets.length; i++){ - var layout = new elm.Elm.Layout(win); - layout.setFile("twitter_example_01.edj", "tweet"); + for(i=0; i < tweets.length; i++){ + var layout = new elm.Elm.Layout(win); + layout.setFile("twitter_example_01.edj", "tweet"); + layout.setText("user_name", screen_name); + layout.setText("screen_name", " - @"+screen_name); - layout.setText("user_name", screen_name); - layout.setText("screen_name", " - @"+screen_name); - - var entry = new elm.Elm.Entry(win); - entry.setText("elm.text", text); - console.log(text); - layout.contentSet("tweet_text", entry); + var entry = new elm.Elm.Entry(win); + entry.setText("elm.text", text); + console.log(text); + layout.contentSet("tweet_text", entry); +</code> - item = list.itemAppend("", layout, null, null, null); - } +Add a layout widget to Elm.List and call ''list.go()'' start to display the list properly. +<code javascript> + item = list.itemAppend("", layout, null, null, null); + } +list.go(); </code> --
