Re: Really weird NSTextView behaviour
Re: Really weird NSTextView behaviour
- Subject: Re: Really weird NSTextView behaviour
- From: David Aames <email@hidden>
- Date: Thu, 26 Oct 2006 00:03:38 +0100
On 25 Oct 2006, at 23:37, Nick Zitzmann wrote:
On Oct 25, 2006, at 3:42 PM, David Aames wrote:
Now I'm really puzzled - how can this method change some internal
value of my object???
I'm not sure, but did you try setting the contents of the
NSTextStorage instead of calling -setString:?
Yup... I've tried that and it doesn't help
<CODE>
NSTextStorage* ts = [tagsLocsLocationView textStorage];
[ts replaceCharactersInRange:NSMakeRange(0, [ts length])
withString:add];
</CODE>
I've tried using watchpoints but I couldn't get them to run (the
hardware rwatch and awatch commands). The normal watch command is
pretty useless since it doesn't work out of scope.
Xcode's support for watchpoints is worse than useless. I just do
this using the GDB console instead: <http://lists.apple.com/
archives/xcode-users/2004/Oct/msg00275.html>
The post about the watchpoint was real useful... thanks for that. Now
I've attached a watchpoint to the variable and I've discovered
something _really_ strange: the actual NSString object doesn't change
(it's the same pointer!) but for some reason it just reports that it
is empty. My wildest guess would be that something is modifying the
length of the string - so now I need to add a watchpoint for the
count ivar of NSString (if I only knew how to do that). Also it seems
really weird I have to resort to such extreme debug techniques to
solve a mysterious issue... but I can't find any errors in my code.
So thanks to anyone reading this and trying to help.
David
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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