1 Reply Latest reply: Jul 30, 2008 7:37 PM by orangekay
whafrog Level 1 Level 1
This seems like a real newbie question, but I have to get a monthOfYear value from NSCalendarDate (which is NSInteger) and use that to create an NSIndexPath (which wants an NSUInteger). How do I do this? Thanks!

iMac 20in. (Intel 2GHz), Mac OS X (10.5.3)
Solved by orangekay on Jul 30, 2008 7:37 PM Solved
They're just typedefstypedef long NSInteger;typedef unsigned long NSUInteger;#elsetypedef int NSInteger;typedef unsigned int NSUInteger;#endifIf you get a complaint from the compiler then just typecast it. There's nothing to convert.
  • orangekay Level 5 Level 5
    They're just typedefs


    typedef long NSInteger;
    typedef unsigned long NSUInteger;
    #else
    typedef int NSInteger;
    typedef unsigned int NSUInteger;
    #endif


    If you get a complaint from the compiler then just typecast it. There's nothing to convert.