> On Aug 27, 2015, at 5:32 PM, Boyd Collier <[email protected]> wrote:
> 
> I’ve tried 
>       let theTabStop: NSTextTab = NSTextTab(NSLeftTabStopType, loc, 
> (tabInterval * cnt))
> 
> but am told that NSLeftTabStopType is an “unresolved identifier”, which I 
> understand has to do with enums being quite different in swift.
> Surely, the correct way to deal with this is relatively simple, but I’ve not 
> yet come up with it.  Any help would be greatly appreciated.

Command-click on ’NSTextTab’ to see the Swift definition. The first parameter 
to init isn’t a tab stop type, it’s an NSTextAlignment. (The Obj-C code you’re 
porting seems to be wrong, but it probably doesn’t matter because the correct 
enum has the same numeric value…) Command-click on NSTextAlignment and you’ll 
see the enum value you want is called just ‘Left’.

—Jens
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to