textDidChange: in SearchTextField send badly formatted notification

RESOLVED FIXED

Status

Camino Graveyard
General
RESOLVED FIXED
14 years ago
13 years ago

People

(Reporter: olivier, Assigned: Simon Fraser)

Tracking

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98)
Build Identifier: 2005012108 (v0.8+)

The method in question is  - (void)textDidChange:(NSNotification *)aNotification
 and mouseDown: from SearchTextField.m.

The way it is implemented does not comply with the doc from apple. As it will
call controlTextDidChange: on the delegate but with a notification that is not
formatted correctly:
"- (void)controlTextDidChange:(NSNotification *)aNotification
Sent by the default notification center to the delegate when the text in the
receiving control (usually a text field, a form field, or NSMatrix with editable
cells) changes. The name of notification aNotification is always
NSControlTextDidChangeNotification. Use the key @"NSFieldEditor" to obtain the
field editor from aNotification’s userInfo dictionary. If the delegate
implements this method, it’s automatically registered to receive this notification."


Reproducible: Always

Steps to Reproduce:
run the application and in the bookmark view change type something in the search box
- [BookmarksViewController controlTextDidChange:]
look at the notification

Actual Results:  
"NSConcreteNotification 6155430 {name = NSTextDidChangeNotification; object =
<NSTextView: 0x710c680>
    Frame = {{9.00, 3.00}, {116.00, 19.00}}, Bounds = {{0.00, 0.00}, {116.00,
19.00}}
    Horizontally resizable: YES, Vertically resizable: YES
    MinSize = {116.00, 19.00}, MaxSize = {10000.00, 10000.00}
}"


Expected Results:  
"NSConcreteNotification 5014a0 {name = NSControlTextDidChangeNotification;
object = <SearchTextField: 0x6157200>; userInfo = <CFDictionary 0x6ab50d0
[0xa01900e0]>{type = immutable, count = 1, capacity = 1, pairs = (
	3 : <CFString 0xa2dd9c4c [0xa01900e0]>{contents = "NSFieldEditor"} =
<NSTextView: 0x6ab28a0>
    Frame = {{9.00, 3.00}, {116.00, 19.00}}, Bounds = {{0.00, 0.00}, {116.00,
19.00}}
    Horizontally resizable: YES, Vertically resizable: YES
    MinSize = {116.00, 19.00}, MaxSize = {10000.00, 10000.00}

)}}"
(Reporter)

Comment 1

14 years ago
Created attachment 172297 [details] [diff] [review]
modify the code to send the correct notification
Attachment #172297 - Flags: review?(sfraser_bugs)
(Reporter)

Updated

14 years ago
Blocks: 263336
(Assignee)

Comment 2

14 years ago
You seem to have attached the wrong file.
Assignee: pinkerton → sfraser_bugs
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Comment 3

14 years ago
Created attachment 172322 [details] [diff] [review]
new source
(Reporter)

Updated

14 years ago
Attachment #172297 - Attachment is obsolete: true
Attachment #172322 - Flags: review?(sfraser_bugs)
(Assignee)

Comment 4

14 years ago
I checked it in. Thanks for the fix!
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Olivier Pinkerton landed a bunch of changes in .nib files to the preferences.
Could you check to see if your nib file is still ok ?

ps: désolé.
oups wrong bug
(Reporter)

Updated

14 years ago
Attachment #172297 - Flags: review?(sfraser_bugs)
Comment on attachment 172322 [details] [diff] [review]
new source

Clearing the review? flag since this was checked in/fixed in Jan :-)
Attachment #172322 - Flags: review?(sfraser_bugs)
You need to log in before you can comment on or make changes to this bug.