• 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
Seeking debugging advice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Seeking debugging advice


  • Subject: Seeking debugging advice
  • From: David Aames <email@hidden>
  • Date: Thu, 26 Oct 2006 23:34:07 +0100

Hello all,

I've been fighting with a strange bug for the last 3 days and I'm not sure what to do now - I'm completely stuck (http:// www.cocoabuilder.com/archive/message/cocoa/2006/10/25/173378). I'm gonna need all your help cocoa wizards. So here's the basic algorithm in ause:
1. I have a location object which has an address property (NSString)
2. Locations are displayed in a table
3. Clicking on a table row updates a NSTextView with the address


So the actual problem is that the address property of the previous selected location object changes to the empty string in a mysterious way. So here's a timeline of the events which happen:
1. When the text changes in the NSTextView its delegate updates the address property of the current selected location (Works)
2. When the user clicks on another row the action method fetches the address property of the newly selected location and tries to set it


Now here's the strange thing: calling NSTextView's setString: somehow modifies the address property of the previous location object to the empty string! So before the call is executed the address property is intact and after the call it's gone. Now how that happens... I dunno but I find it real strange how a NSTextView method modifies an object's property.

So up until now I've tried setting up a watchpoint for the variable. Now the strange behavior here is that it's value only changes once, the first time the property setter is called. I thought that everytime I set a new string as the property it should change but for some reason it doesn't... So what I've done is find out the address of the property (e.g. 0x3234fa5) and then use "po 0x3234fa5" to print out the string. Just before the call to setString: executing the po command outputs the correct address string and after the setStrung: call the po reports an empty string. I've been after this problem for several days now and I can't continue developing until I resolve that... so any advice is greatly appreciated.

Regards,
David


_______________________________________________ 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: Seeking debugging advice
      • From: "Alan Smith" <email@hidden>
    • Re: Seeking debugging advice
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: My custom prefpane appears in "other". How do I move it?
  • Next by Date: Re: Seeking debugging advice
  • Previous by thread: Re: My custom prefpane appears in "other". How do I move it?
  • Next by thread: Re: Seeking debugging advice
  • Index(es):
    • Date
    • Thread