• 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
Re: Debugger calling string methods on a window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugger calling string methods on a window


  • Subject: Re: Debugger calling string methods on a window
  • From: j o a r <email@hidden>
  • Date: Sun, 20 Jun 2004 16:28:35 +0200

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?

> 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.

> Does anyone have a more elegant solution or, even better, an
> explanation?

You have some sort of error in your application. 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.

Do you get any warnings when compiling?

j o a r

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.


  • Follow-Ups:
    • Re: Debugger calling string methods on a window
      • From: Jonathan Jackel <email@hidden>
    • Re: Debugger calling string methods on a window
      • From: Mike Ferris <email@hidden>
References: 
 >Debugger calling string methods on a window (From: Jonathan Jackel <email@hidden>)

  • Prev by Date: Debugger calling string methods on a window
  • Next by Date: debugging a static variable
  • Previous by thread: Debugger calling string methods on a window
  • Next by thread: Re: Debugger calling string methods on a window
  • Index(es):
    • Date
    • Thread