Closed Bug 279664 Opened 20 years ago Closed 20 years ago

textDidChange: in SearchTextField send badly formatted notification

Categories

(Camino Graveyard :: General, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: olivier, Assigned: sfraser_bugs)

References

Details

Attachments

(1 file, 1 obsolete file)

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}

)}}"
Attachment #172297 - Flags: review?(sfraser_bugs)
Blocks: 263336
You seem to have attached the wrong file.
Assignee: pinkerton → sfraser_bugs
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch new sourceSplinter Review
Attachment #172297 - Attachment is obsolete: true
Attachment #172322 - Flags: review?(sfraser_bugs)
I checked it in. Thanks for the fix!
Status: NEW → RESOLVED
Closed: 20 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
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.

Attachment

General

Creator:
Created:
Updated:
Size: