Re: Debugger calling string methods on a window
Re: Debugger calling string methods on a window
- Subject: Re: Debugger calling string methods on a window
- From: Jonathan Jackel <email@hidden>
- Date: Sun, 20 Jun 2004 20:44:47 -0400
On Jun 20, 2004, at 10:28 AM, j o a r wrote:
On 2004-06-20, at 15.47, Jonathan Jackel wrote:
This seems bizarre. gdb appears to be sending -length and
-getcharacters:range: messages to the main window in my app. This
caused the app to raise an exception while being debugged.
And this only happens when you're in the debugger, and not when you're
running the app outside of the debugger?
Now it doesn't happen at all. I've literally made no changes in the
code since last time. I merely switched to deployment style, compiled,
and dragged the completed app to my applications folder. I've tried to
get the issue to reappear under both deployment and development styles,
and both with and without the debugger. Nothing.
I seem to have solved the problem by subclassing NSWindow and
implementing those methods so that they are forwarded to a dummy
string. I set the custom class of my main window to my new subclass.
This seems to satisfy gdb.
Ouch! Don't do that! It has to be the wrong way to solve the problem.
Agreed. "Solved" was too strong a word. "Identified the symptom"
would have been more precise.
Does anyone have a more elegant solution or, even better, an
explanation?
You have some sort of error in your application.
Apparently it was solved by my 8-year-old son while I wasn't looking.
You need to track down
why the message is being sent to your window. Perhaps it would be good
to start your check in MyController.m:93, since that seems to be where
things start to go wrong.
Well, that line merely sent a message to an NSScanner that has nothing
whatsoever to do with the window.
Do you get any warnings when compiling?
No. I don't even have an outlet to the window, let alone send it any
messages.
Jonathan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.