discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSControl fix


From: Fred Kiefer
Subject: Re: NSControl fix
Date: Thu, 30 Aug 2007 16:02:38 +0200
User-agent: Thunderbird 1.5.0.12 (X11/20060911)

Andreas Höschler wrote:
> Hi all,
> 
> *NSControl*
> The delegate of an NSControl should be able to access validated values
> with objectValue in -controlTextDidChange:(NSNotification *)obj (at
> least that's the behavior on MacOSX).
> 
> - (void)textDidChange: (NSNotification *)aNotification
> {
> NSMutableDictionary *dict;
> 
> [self validateEditing]; // <---------------- add this
> 
> 
> dict = [[NSMutableDictionary alloc] initWithDictionary:
> [aNotification userInfo]];
> [dict setObject: [aNotification object] forKey: @"NSFieldEditor"];
> 
> [nc postNotificationName: NSControlTextDidChangeNotification
> object: self
> userInfo: dict];
> RELEASE(dict);
> }
> 

I still think this patch, which you did propose before is wrong. We
should do the validation when accessing the value of the cell. According
to the specification this gets done in NSActionCell for int, float and
string values, but not for the object value itself.
Which specific subclass of NSCell are you using? Perhaps the
implementation of this class is wrong.

Fred




reply via email to

[Prev in Thread] Current Thread [Next in Thread]