Wiki page javascript_tutorial changed with summary [] by Larry de Oliveira Lira Junior
This commit is contained in:
parent
afc2b64881
commit
fa9dd442a0
|
@ -108,7 +108,7 @@ win.setVisible(true);
|
|||
====Twitter Example====
|
||||
|
||||
<note tip>
|
||||
You find this example in ''elementary_source/src/examples/twitter_example_01.js''
|
||||
You find complete twitter example in ''elementary_source/src/examples/twitter_example_01.js''
|
||||
</note>
|
||||
|
||||
This is a more complex example, with edje theme and some external requirements. We need install ''request'' and ''twitter'' module, for this use the ''npm'' (node.js package manager) it downloads and installs all necessary to use this modules.
|
||||
|
@ -174,8 +174,7 @@ Make a new file stream with ''fs.createWriteStream'', download the image to file
|
|||
}
|
||||
</code>
|
||||
|
||||
|
||||
For each tweet we create a new Elm.Layout with theme defined in ''twitter_example_01.edj'', using layout method ''setfile'', ''setText'' is used to define a new text to Edje elements in theme. To have a formatted text we used Elm.Entry and added this widget into theme using ''setContent'' layout method
|
||||
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);
|
||||
|
@ -190,4 +189,5 @@ For each tweet we create a new Elm.Layout with theme defined in ''twitter_exampl
|
|||
layout.contentSet("tweet_text", entry);
|
||||
|
||||
item = list.itemAppend("", layout, null, null, null);
|
||||
}
|
||||
</code>
|
||||
|
|
Loading…
Reference in New Issue