Re: program termination after releasing self defined NSXMLParser class

2010-04-18 Thread Alexander Spohr
Am 17.04.2010 um 18:44 schrieb Fritz Anderson: > On 16 Apr 2010, at 11:34 AM, Alexander Spohr wrote: > >> That means that -parse does not block. It runs in the event loop. > > I have not found this to be the case. In the context of the documents, and of > the customary terms for XML parsing, "

Re: program termination after releasing self defined NSXMLParser class

2010-04-17 Thread Fritz Anderson
On 17 Apr 2010, at 11:44 AM, Fritz Anderson wrote: > I have not found this to be the case. In the context of the documents, and of > the customary terms for XML parsing, "event-driven" parsing, provided by > NSXMLParser, means that the parser yields elements one-by-one as it steps > through the

Re: program termination after releasing self defined NSXMLParser class

2010-04-17 Thread Fritz Anderson
On 16 Apr 2010, at 11:34 AM, Alexander Spohr wrote: > Yes. The docs state: > -parse > Starts the event-driven parsing operation. > > That means that -parse does not block. It runs in the event loop. > So the parser starts running and wants to talk to its delegate. But too bad - > you released it

Re: program termination after releasing self defined NSXMLParser class

2010-04-17 Thread Dominic Dauer
Ok. It works. Instead of subclassing NSXMLParser I created my own Class with implementation of the NSXMLParserDelegate Protocol. I create a NSXMLParser object and set the delegate to an created object of my subclassed NSXMLParserDelegate. > Whenever I hear this from a programmer, I cringe. It'

Re: program termination after releasing self defined NSXMLParser class

2010-04-16 Thread Roland King
Nice try Kyle but that bug is still outstanding with apple as open and I maintain that the UITextField doesn't respond to the method it's sending its delegate and the hang in that case, if we're talking about the same case, is due to a different interaction. It may be that having self as delegat

Re: program termination after releasing self defined NSXMLParser class

2010-04-16 Thread Kyle Sluder
On Fri, Apr 16, 2010 at 9:25 AM, Jens Alfke wrote: > That’s true in general, but in this case he’s setting the parser’s delegate > to itself. Which is weird, but should mean that the object can’t possibly > outlive the delegate :) Well there's yer problem! :D The first step is not making an obje

Re: program termination after releasing self defined NSXMLParser class

2010-04-16 Thread Alexander Spohr
Am 16.04.2010 um 00:43 schrieb Dominic Dauer: > With the purpose to test these simple class I just did the following in the > controller class of one view: > > -(BOOL)textFieldShouldBeginEditing:(UITextField *)textField { > > XMLParser *parser = [[XMLParser alloc] initWithContentsOfURL:[

Re: program termination after releasing self defined NSXMLParser class

2010-04-16 Thread Jens Alfke
On Apr 16, 2010, at 8:53 AM, Kyle Sluder wrote: > Ross is probably right. You need to nil out weak references before releasing > things. Since you don't know if the NSXMLParser is going to live beyond your > releasing it, you don't know if it's going to later try messaging its > delegate. If t

Re: program termination after releasing self defined NSXMLParser class

2010-04-16 Thread Kyle Sluder
On Apr 16, 2010, at 2:58 AM, Dominic Dauer wrote: Ok. Sorry for that. I never worked with the debugger. Whenever I hear this from a programmer, I cringe. It's like hearing a carpenter say, "I've never used a screwdriver." After I entered bt or backtrace I got the following message: P

Re: program termination after releasing self defined NSXMLParser class

2010-04-16 Thread Jens Alfke
On Apr 16, 2010, at 2:58 AM, Dominic Dauer wrote: > After I entered bt or backtrace I got the following message: > > Program received signal: “EXC_BAD_ACCESS”. > #0 0x93e0bedb in objc_msgSend () > #1 0x in ?? () > > This is all. OK, that means the stack got corrupted before the cra

Re: program termination after releasing self defined NSXMLParser class

2010-04-16 Thread Ross Carter
On Apr 16, 2010, at 5:58 AM, Dominic Dauer wrote: > Ok. Sorry for that. I never worked with the debugger. > After I entered bt or backtrace I got the following message: > > Program received signal: “EXC_BAD_ACCESS”. > #0 0x93e0bedb in objc_msgSend () > #1 0x in ?? () > Just a wild g

Re: program termination after releasing self defined NSXMLParser class

2010-04-16 Thread Dominic Dauer
Ok. Sorry for that. I never worked with the debugger. After I entered bt or backtrace I got the following message: Program received signal: “EXC_BAD_ACCESS”. #0 0x93e0bedb in objc_msgSend () #1 0x in ?? () This is all. Dominic ___ Cocoa-

Re: program termination after releasing self defined NSXMLParser class

2010-04-15 Thread Jens Alfke
On Apr 15, 2010, at 10:39 PM, Dominic Dauer wrote: > The debugger shows this: > > Program received signal: “EXC_BAD_ACCESS” Yes, but what functions are on the stack? (They show up in a list, and also you can type “bt” at the gdb prompt to get a textual list.) —Jens_

Re: program termination after releasing self defined NSXMLParser class

2010-04-15 Thread Dominic Dauer
On 16.04.2010, at 01:45, Jens Alfke wrote: > Run the app with the debugger and it should tell you where it's crashing. > That may help pin it down. The debugger shows this: Program received signal: “EXC_BAD_ACCESS” Dominic ___ Cocoa-dev ma

Re: program termination after releasing self defined NSXMLParser class

2010-04-15 Thread Jens Alfke
On Apr 15, 2010, at 3:43 PM, Dominic Dauer wrote: Everything works fine until call the release method to the parser. In the simulator the app is terminating without any message in the log. I guess I do a fundamental mistake. Run the app with the debugger and it should tell you where it's

program termination after releasing self defined NSXMLParser class

2010-04-15 Thread Dominic Dauer
Hi all, I am writing on an app for the iPhone/iPod which parses a xml Document to display the data in table views. I want to ask something fundamental. I created my own class of NSXMLParser: - XMLParser.h #import @interface XML