Hi,
In my app I wanna use multiple delegates. The flow is as follows: a root object parses the xml file and depending on its root tag it creates an other object, this object becomes the new delegate of the parser. When the object is done processing the file, the root object becomes again the delegate of the parser, but here's lies the problem:
in root object:
parserDidStartDocument: - create object depending on tag - set object to be the delegate
in object:
parserDidStartDocument //doesn't get called!!! - setup some values
parserDidEndDocument - do some other things - reset the delegate
in root object
parserDidEndDocument //doesn't get called!!! - do some stuff
I try to send do [parser parse] after creating the object in the root object, but that causes some weird loops. Now, I'm thinking, would it be a big performance issue if I had 2 different delegates? One for the root object and another for the newly created object. I would like to let the flow go as I described above.
Thanks in advance
|