Return to problem list

ID: 4974675

URL: rdar://problem/4974675

Title: Wrong placeholder displayed for NSPopUpButton selectedIndex binding

Originated Date: 03-Feb-2007

State: Open

Fixed? No. Actual results are different on 10.5, but I'm not even sure what the behavior is.

Attachments: PopUpSelectionBindingBug.zip

Description:

Summary: I've bound an NSPopUp button to an NSArrayController. I've bound the content of the button to the arrangedObjects of the controller and the selectedIndex of the button to the selectionIndex of the controller (which is the only way that I can get the selection binding to work correctly, so that changes in the button selection are reflected in the controller, and vice versa). I've disabled the option Inserts Null Placeholder. However, I do want a No Selection Placeholder to appear in the button when there is no selection. The bug is that the Null Placeholder appears in the button rather than the No Selection Placeholder when there is no selection. Steps to Reproduce: 1) Unzip the attached file PopUpSelectionBindingBug.zip. 2) Open PopUpSelectionBindingBug.xcodeproject. 3) Build and Run the project. Expected Results: The string "Correct Placeholder: No Selection" should appear in the popup button. Actual Results: The string "Incorrect Placeholder: Null" appears in the popup button. (I've used this string for demonstration purposes, but if I leave the Null Placeholder blank in the nib, the string "No Value" appears, which is still not the No Selection Placeholder.) Regression: No regression testing done. Notes: I've attached a sample Xcode 2.4.1 project to demonstrate the bug as the file PopUpSelectionBindingBug.zip.

Return to problem list