Re: Dissappearing textField string value
Re: Dissappearing textField string value
- Subject: Re: Dissappearing textField string value
- From: Roland King <email@hidden>
- Date: Mon, 14 May 2012 13:01:30 +0800
I'm confused. What's the method stringValue on theSudokuTextField? That's one of your methods right as stringValue is a method on NSNumber AFAIK. What does it do?
You're setting the attributedStringValue and the getting the stringValue, in what way are they related?
On May 14, 2012, at 10:36 AM, Charlie Dickman wrote:
> Good people,
>
> This one really has me stumped. Perhaps someone can help me out.
>
> In my program is the code...
>
> NSAttributedString *theAttributedString = [[NSAttributedString alloc ]
> initWithString: possibleString
> attributes: theAttributes];
> PRINT_APPEND(@"\n%d (%d)...\n%@",
> [theAttributedString retainCount],
> [theAttributedString length],
> theAttributedString);
> [theSudokuTextField setAttributedStringValue: theAttributedString];
> NSString *s = [theSudokuTextField stringValue];
> assert([s length] != 0);
>
> PRINT_APPEND looks like this
>
> #define PRINT_APPEND(format, ...) [self printAppend: [NSString stringWithFormat: format, ##__VA_ARGS__]]
>
> printAppend looks like this
>
> - (void) printAppend: (NSString *) theNSString {
> printf("%s", [theNSString UTF8String]);
> }
>
> This is what appears on the debug console
>
> 1 (29)...
> 2
> 5
> 7 8 {
> NSFont = "\"BaskOldFace 9.00 pt. P [] (0x3687e20) fobj=0x511bf0, spc=2.25\"";
> }Assertion failed: ([s length] != 0), function -[Controller updatePossibilitiesDisplay:], file /Users/Charlie/SudokuX III/Controller.m, line 1143.
>
> What could possibly make the stringValue disappear like this?
>
> Charlie Dickman
> email@hidden
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden