I'm programming an iphone app that uses an xml parser:
I got 2 classes: DataManager and XMLParser.
the XMLParser class is delegated so i can use functions like parserDidEndDocument.
Now in the class DataManager, i call a function in the XMLParser:
XMLParser *xml = [[XMLParser alloc] init]; NSMutableArray *test = [xml getData]; //now iterate the mutablearray
this function creates a new connection and calls the XMLParser.
The problem is that it now returns a empty array, i think this is because the NSConnection is in a separate thread.
In the XMLParser class i can use parserDidEndDocument,
should i create a while loop in DataManager, and wait until parserDidEndDocument sends a message?
Or can i make NSConnection single threaded?