I’m parsing a feed and I’d like to do a simple count of all items that meet a certain criteria and then pass this number along with the other parsed data to the subsequent PosterScreens and have this number displayed in the left Breadcrumb field. I’m adding the count to the content array using…
myCount = myCount + 1 'count how many items meet criteria
content.myItemCount = myCount
Then in the PosterScreen and SpringBoard screens, I assume I need to display the count using something like…
screen.SetBreadcrumbText(myitemcount, rightBread)
I"m confused on what initializations and conversions need to be done. I’ve been trying various Str() and Stri() conversions, but I’m still not able to get anything to display in the Breadcrumb field. It’s possibly syntax issues since that seems to be what trips me up to most. To keep it simple, how would you count each item in an XML feed and pass this on to be used in a Breadcrumb?
TIA
Didn’t do it. The snippet below gives the error.
The data item is being added ok to the array because I do a PrintAA(episode) and it includes the item myitemcount: 1
Interface not a member of BrightScript Component (runtime error &hf3) in ...pkg:
/source/EpisodeScreen.brs(18)
018: screen.SetBreadcrumbText(content.myItemCount.ToStr (), rightBread)
Local Variables:
show &h4010 bsc:roAssociativeArray, refcnt=3
leftbread &hc010 bsc:roString (2.1 was String), refcnt=2
rightbread &h0100 String (VT_STR_CONST) val:
global &h0020 rotINTERFACE:ifGlobal
m &h0010 bsc:roAssociativeArray, refcnt=4
screen &h0010 bsc:roPosterScreen, refcnt=2
mrss &h0010 bsc:roAssociativeArray, refcnt=1
content &h0010 bsc:roArray, refcnt=2
selectedepisode &h0002 Integer val:0
msg &h0000 <uninitialized> val:Uninitialized
BrightScript Debugger>
Then the EpisodeScreen is setup with the following.