SimpleRSSReader and other questions


#1

Hi,

I’m trying to learn juce using tutorials and source codes.
I’m in trouble with SimpleRSSReader.zip that you can find at http://www.anticore.org/juce/.
This zip was uploaded on 2005 so many things inside juce was changed.
I’m able to compile it (juce 1.50) but it doesn’t display anything when I click Go button.
I don’t know if problem is that createRowComponent not fired up.
createRowComponent is deprecated ?
Any hint ?

Another question:

Suppose I’ve a file that I load into a string using loadFileAsString method,
how to get numbers of lines inside this string ?
How to get each line ?

Thank you.


#2

[quote]Another question:

Suppose I’ve a file that I load into a string using loadFileAsString method,
how to get numbers of lines inside this string ?
How to get each line ?[/quote]

Ok, I can use StringArray with addTokens method.


#3

Hi Lude,
I had to load an xml file, and split it based on occurrence of new line characters. What I realized is that on Macintosh the newline character is “\n\r” and on windows it is “\n”. Keep that in mind when you use StringArray with addTokens method.


#4

I think there’s a typo, maybe you suggest “\r\n” ?


#5

Sorry, it should have been “\r\n”


#6

Just use StringArray::addLines and it’ll take care of all of the newline stuff.


#7

…you do know about the XmlDocument class, right?


#8

…you do know about the XmlDocument class, right?[/quote]

My requirement wasn’t to parse the xml file. I had to remove the new line characters.


#9

Ok, I’ve spent two days and now it works!
I’m happy that I’ve understand those ListBox\ListBoxModel things!

Lude.