Notch Notch Manual 0.9.23
 Light | Dark
GetNumEntries()

GetNumEntries()

Purpose #

Retrieves the current number of entries retrieved in a RSS Node.

Syntax #

int GetNumEntries();
returns the number of entries as an integer.

Example #

function Update()
{ 
    numLayers = Document.GetNumLayers();  
    layer = Document.GetLayer(0);
    layerEndTime = layer.GetEndTime();
    
    rssNode = layer.FindNode("RSSFeed").AsRSSFeedNode();
    textNode = layer.FindNode("MainText");

    numRssEntries = rssNode.GetNumEntries();
    entryIndex = 0;
    if (numRssEntries > 0)
    {
        entryText = rssNode.GetEntryTitle(entryIndex);
    }
    else
    {
        entryText = "No entries";
    }
    textNode.SetText(entryText);
}