Re: Another NSXMLParser question (multiple delegates)
Re: Another NSXMLParser question (multiple delegates)
- Subject: Re: Another NSXMLParser question (multiple delegates)
- From: Kent Karlsson <email@hidden>
- Date: Tue, 21 Jun 2005 14:50:26 +0200
It seems to me that the easiest way to get around this would be to
manually calling parserDidStartDocument with the same arguments in
the new delegate and vice versa on your way out.
-- kent
On 21 jun 2005, at 14.25, Jesus De Meyer wrote:
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
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden