Wiki page javascript_tutorial changed with summary [typos] by Lauro Moura

This commit is contained in:
Lauro Moura 2016-12-02 12:53:26 -08:00 committed by apache
parent 78d2c6e0c6
commit 02f6bead83
1 changed files with 6 additions and 6 deletions

View File

@ -140,7 +140,7 @@ win.setText("Twitter App");
win.setAutohide(true);
</code>
Create and show two //box// widget containers, one to be the top level box and another to work like a list, with the individual tweets.
Create and show two //boxes// widget containers, one to be the top level box and another to work like a list, with the individual tweets.
<code javascript>
box = new efl.Efl.Ui.Box(win);
@ -166,9 +166,9 @@ tweet_box_orient = tweet_box.cast("Efl.Orientation");
tweet_box_orient.setOrientation(efl.Efl.Orient.VERTICAL);
</code>
Now we are ready to ask the twitter module to get the timeline of the target user. The 'get' function will be passed a callback that will be called when the data is ready. Inside it we will start building the tweet list.
Now we are ready to ask the twitter module to get the timeline of the target user. The 'get' function will be passed a callback that will be called when the data is ready. Inside it, we will start building the tweet list.
Also we create an array to store the icon widgets to be filled when the icon finish downloading.
Also, we create an array to store the icon widgets to be filled when the icon finish downloading.
<code javascript>
icon_array = new Array(); // To store the icons
@ -209,7 +209,7 @@ Once we have the theme loaded, we can use ''setText'' to set a new text to the r
layout.setText("screen_name", " - @"+screen_name);
</code>
To have a formatted text, we use an ''Elm.Entry'' to show the main tweet text and add this widget into theme using the ''setContent'' layout method. This allows us to inject full widgets into the layout, besides the basic stuff. Like ''setText'', ''setContent'' also receives the name of the target part as the first argument.
To have a formatted text, we use an ''Elm.Entry'' to show the main tweet text and add this widget into the theme using the ''setContent'' layout method. This allows us to inject full widgets into the layout, besides the basic stuff. Like ''setText'', ''setContent'' also receives the name of the target part as the first argument.
<code javascript>
// continuing the previous for loop
@ -244,7 +244,7 @@ Now, for the icon, we use an ''efl.Efl.Ui.Image''. It'll be set to display the d
} // Finished the for loop
</code>
To show the tweet image, we need to download it. We can accomplish this creating a new file stream with ''fs.createWriteStream'' and download the image to this file stream using the ''request'' module. Once the download is finished, we iterate through the list of icons widgets and tell them to display the dowloaded file. We also tell the tweetbox and the window to show themselves.
To show the tweet image, we need to download it. We can accomplish this creating a new file stream with ''fs.createWriteStream'' and download the image to this file stream using the ''request'' module. Once the download is finished, we iterate through the list of icons widgets and tell them to display the downloaded file. We also tell the tweet box and the window to show themselves.
<code javascript>
@ -268,7 +268,7 @@ win.setSize(380, 400);
win.setVisible(true);
</code>
You will find these and more examples in directory ''src/examples'' in efl source code.
You will find these and more examples in directory ''src/examples'' in the efl source code.
All you need to run is:
<code bash>