NSPredicateEditor row template's left expression won't stay key paths
| Originator: | isaac.greenspan | ||
| Number: | rdar://21787301 | Date Originated: | 12-Jul-2015 07:41 PM |
| Status: | Closed (dup of 18305476) | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 6.2 (6C131e) |
| Classification: | UI/Usability | Reproducible: | Always |
Summary:
When editing an NSPredicateEditor’s row template in interface builder (in Xcode), the left expression type won’t stay “Key Paths,” instead changing to “Constant Values” on its own. The generated XML shows a mixture of the two:
<expression type="keyPath">
<string key="keyPath">name</string>
</expression>
<expression type="keyPath">
<string key="keyPath">address</string>
</expression>
<expression type="keyPath">
<string key="keyPath">sign</string>
</expression>
<expression type="constant">
<string key="constantValue">test</string>
</expression>
Steps to Reproduce:
1. Create a new Cocoa app
2. Open MainMenu.xib
3. Open the window object
4. Add an NSPredicateEditor
5. Select the “name contains __” row template (the second one)
6. Observe that the “Left Exprs” type is “Key Paths”
7. Add an additional item to “Left Exprs”
8. Select another file (leave IB)
9. Select MainMenu.xib again
10. Select the “name contains __” row template again
11. Observe that the “Left Exprs” type is “Constant Values”
12. Save and open MainMenu.xib in a text editor
13. Observe that the expression types are mixed up, as shown above.
Expected Results:
When an expression type is selected in an NSPredicateEditor row template in IB, it stays selected and isn’t changed by adding another item. The items all have the same type in XML, as suggested by the interface in IB.
Actual Results:
The type wanders back to “Constant Values” on its own. Different items have different types in the XML. There’s no way to fix this in IB, but manually editing the XML makes it compile and run just fine.
Regression:
Definitely happens on Xcode 6.1 and 6.2 on OS X 10.9.
Notes:
Example project attached was created by following the numbered steps above exactly.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!