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
_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep
|