NSRectEdge constants not accessible from Swift

Originator:brent
Number:rdar://17532676 Date Originated:02-Jul-2014 12:23 AM
Status:Open Resolved:
Product:OS X SDK Product Version:Xcode6-Beta2 (6A216f)
Classification:Other Bug Reproducible:Always
 
Summary:
The NSRectEdge constants (NS{Min,Max}{X,Y}Edge) constants are not available in Swift.

Steps to Reproduce:
1. Attempt to write a method call to NSPopover.showRelativeToRect(_:ofView:preferredEdge:).

Expected Results:
NSMinYEdge and other such constants are available (probably as NSRectEdge.MinY or .MinYEdge).

Actual Results:
They are not.

Notes:
NSRectEdge is a typedef to NSInteger, and the constants are actually macros aliasing equivalent Core Graphics symbols.

The workaround is to use something like NSRectEdge(CGRectEdge.MinYEdge.toRaw()), which is pretty fugly.

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!