I have an NSSegmentedControl set up as a sender, adding functions when the user clicks through each button in the object. The snippet below always worked fine for me. It still does, however I’m getting the following warning when I build using 64bit architecture. The warning goes away when I revert to 32 bit. Can someone please advise me on how to edit the code?
Thanks for the help. -paul.
“implicit conversion loses integer precision: NSInteger (aka long) to “int”
int selectedSegment = [arSegController selectedSegment];
int clickedSegmentTag = [[arSegController cell] tagForSegment:selectedSegment];
if (clickedSegmentTag == 0) {
You need to use
NSIntegerinstead ofintfor your variables. You can just look at the declarations inNSSegmentedControl.h, but better is to read Apple’s 64-Bit Transition Guide for Cocoa.