• 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
Dissappearing textField string value
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dissappearing textField string value


  • Subject: Dissappearing textField string value
  • From: Charlie Dickman <email@hidden>
  • Date: Sun, 13 May 2012 22:36:54 -0400

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

  • Follow-Ups:
    • Re: Dissappearing textField string value
      • From: Roland King <email@hidden>
  • Prev by Date: [SOLVED] Re: KVO de-observation difficulties when closing a window
  • Next by Date: Re: Dissappearing textField string value
  • Previous by thread: [SOLVED] Re: KVO de-observation difficulties when closing a window
  • Next by thread: Re: Dissappearing textField string value
  • Index(es):
    • Date
    • Thread