• 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
NSTextfield updating values but not clearing values with bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextfield updating values but not clearing values with bindings


  • Subject: NSTextfield updating values but not clearing values with bindings
  • From: Cornelius Jaeger <email@hidden>
  • Date: Tue, 17 May 2005 21:11:58 +0200

hi all,

i have several nstextfields that display things like.
5 of 7 blah via displayValuePattern1..n
when i use bindings or even update these textfields programmatically the text fields layer the text on top of each other. the old values are not cleared.
the gotcha is, i am using a sheet to call a printing process, and the print info has " setCanSpawnSeparateThread " set to YES.
Sooo, i guess the messages are coming back from different threads.
Eh, setting the text field to an empty string, or similar, doesn't seem to work.
Any suggestions?


The interface is bound to the defaults controller

- (void)printOperationDidRun:(NSPrintOperation *)printOperation success:(BOOL)success contextInfo:(void *)contextInfo
{
if (success) {
int paperCounter = [[[[NSUserDefaultsController sharedUserDefaultsController] values] valueForKey:@"paperCapacityCounter"] intValue];
int inkCounter = [[[[NSUserDefaultsController sharedUserDefaultsController] values] valueForKey:@"inkCapacityCounter"] intValue];
paperCounter++;
inkCounter++;
[[[NSUserDefaultsController sharedUserDefaultsController] values] setValue:[NSNumber numberWithInt:paperCounter] forKey:@"paperCapacityCounter"];
[[[NSUserDefaultsController sharedUserDefaultsController] values] setValue:[NSNumber numberWithInt:inkCounter] forKey:@"inkCapacityCounter"];
[self resetPrintView];
}
}


Any pointer as to how i can solve this would be great.

cornelius
_______________________________________________
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


  • Prev by Date: Re: Sharing instances between NIB's?
  • Next by Date: Re: A CoreData Limitation?
  • Previous by thread: Javabeans in Cocoa/ObjC?
  • Next by thread: Checkmark in a popup with bindings
  • Index(es):
    • Date
    • Thread