• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Another NSXMLParser question (multiple delegates)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Another NSXMLParser question (multiple delegates)


  • Subject: Another NSXMLParser question (multiple delegates)
  • From: Jesus De Meyer <email@hidden>
  • Date: Tue, 21 Jun 2005 14:25:40 +0200

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

  • Follow-Ups:
    • Re: Another NSXMLParser question (multiple delegates)
      • From: Kent Karlsson <email@hidden>
  • Prev by Date: Re: Modal dialog alternatives?
  • Next by Date: Re: Quit and save menu item enabling
  • Previous by thread: Re: Quit and save menu item enabling
  • Next by thread: Re: Another NSXMLParser question (multiple delegates)
  • Index(es):
    • Date
    • Thread