[NSControl stringValue] in accessoryView

  • I've noticed quite strange behaviour of some NSTextField (actually
    NSSecureTextField) instances if they are placed in accessoryView of
    NSSavePanel of the NSDocument in Leopard.

    I've got four secure text fields, two in a "regular" subview of a
    window, the other two in an accessoryView. All four text fields have
    got completely the same settings and the delegate for all of them is
    the same NSObject subclass instance. The delegate implements -(void)
    controlTextDidChange:(NSNotification *)notification method. When
    typing in the pair which is contained in the "regular" view, the
    delegate method is called accordingly and checking for string values
    of those text fields using -stringValue gives correct results, with
    string values updated in accordance to my typing. But, when typing in
    the two fields inside the accessory view, the delegate method is
    called, but string values are not updated. They get updated only
    after the text field is focused out.

    For example, start with empty text field, and type "Apple"; the
    delegate method is called five times, with correct object passed as
    notification's object, but all five times the string value is empty
    string: "". Then, change the focus to some other control, and bring
    it back to the text field. Continue typing, so the resulting text is
    "AppleMac". The delegate method is called for another three times,
    but each time the string value of the text field is "Apple". And so
    on...

    In Tiger (and earlier) this used to work correctly. Has anyone else
    experienced anything similar?

    Milke.
previous month october 2007 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Go to today