Re: Problem parsing file in 64 bit build.

2012-05-06 Thread Quincey Morris
On May 6, 2012, at 23:30 , Quincey Morris wrote: > while they're only 4-bit aligned Er … 4-byte aligned. Also, be careful when debugging these with lldb. At some versions of lldb get the member offsets and struct size wrong in packed structs, so debugger member display is wrong, and so is offs

Re: Problem parsing file in 64 bit build.

2012-05-06 Thread Quincey Morris
On May 6, 2012, at 22:51 , Graham Cox wrote: > Could this be caused by the 64 bit compiler padding out my structures in a > different way for 64-bit builds? Yes, I believe in 64-bit builds 8-byte data types are 8-byte aligned, while they're only 4-bit aligned in 32-bit builds -- or something li

Problem parsing file in 64 bit build.

2012-05-06 Thread Graham Cox
Hi, I'm having an issue with parsing a file that contains structures that are defined with type 'double'. These are 64-bit doubles, in little endian format. In my code, I have typdefs of the various structures and sub-structures within the file that are defined using fixed size types - SInt32,

Re: OSAtomic built-in operations

2012-05-06 Thread Stefan Werner
On 06.05.2012, at 21:29, Rick Mann wrote: > I've seen this technique in other places. Why is that better than just > casting pointer types? Like this: > > int32_t s; > uint32_t u; > > u = *(uint32_t*) &s; Your code has two variables and make it the programmer's job to keep

Re: OSAtomic built-in operations

2012-05-06 Thread Dave Keck
>>    union { >>        int32_t s; >>        uint32_t u; >>    } atomicvar; >>    atomicvar.u = 0; >>    OSAtomicCompareAndSwap32(0, 1, &atomicvar.s); >>    OSAtomicOr32Orig(0, &atomicvar.u); > > I've seen this technique in other places. Why is that better than just > casting pointer types? Like t

Re: OSAtomic built-in operations

2012-05-06 Thread Rick Mann
On May 6, 2012, at 17:11 , Stefan Werner wrote: > Have you tried union{} ? > >union { >int32_t s; >uint32_t u; >} atomicvar; >atomicvar.u = 0; >OSAtomicCompareAndSwap32(0, 1, &atomicvar.s); >OSAtomicOr32Orig(0, &atomicvar.u); I've seen this technique in other

Re: OSAtomic built-in operations

2012-05-06 Thread Stefan Werner
On 06.05.2012, at 02:05, Andreas Grosam wrote: > I would like to use OSAtomicCompareAndSwap32 and OSAtomicOr32Orig using the > same variable. Unfortunately, the first requires a signed int, the other an > unsigned int. > > How can I get this to work? Have you tried union{} ? union {

Re: Can record ID in iOS address book database change

2012-05-06 Thread Mike Abdullah
I believe the transition to iCloud is also effectively a sync reset, so the IDs change. Arguably, your app needs to handle an ID going away anyway, in case the user decides to delete that contact from their address book at some point. On 6 May 2012, at 08:28, Steve Fogel wrote: > Hi, all... >

Re: inconsistent behavior of NSString's localizedCaseInsensitiveCompare

2012-05-06 Thread Jens Alfke
On May 5, 2012, at 10:06 PM, Quincey Morris wrote: > However, even in pure ASCII strings, 'localizedCaseInsensitiveCompare:' > doesn't support sorting via (say) a binary search. Strings such as "a" and > "A" are *equal* according to this method. Binary search doesn't work if > sorted elements

Re: Issue when hiding NSTableColumn while resizing

2012-05-06 Thread Lee Ann Rucker
On May 1, 2012, at 06:40 , Thibault Martin-Lagardette wrote: > The problem in the end is that not only do I have a visual glitch, but this > also feels like a very hacky/dirty solution, and hence, not the way to go. > I feel like I probably should not be trying to hide columns while some others >

OSAtomic built-in operations

2012-05-06 Thread Andreas Grosam
Hi All! I would like to use OSAtomicCompareAndSwap32 and OSAtomicOr32Orig using the same variable. Unfortunately, the first requires a signed int, the other an unsigned int. How can I get this to work? Example: enum { State_Canceling = 1U << 7; }; int _state; // would like to have

Can record ID in iOS address book database change

2012-05-06 Thread Steve Fogel
Hi, all... The Address Book Programming Guide for iOS says that the ABRecordID of a person record in the address book database can change, after a MobileMe sync reset or for some other reason. Is this still true for iOS 5.0? That is, if I store an ABRecordID in my app and later want to retrie

Re: Issue when hiding NSTableColumn while resizing

2012-05-06 Thread Quincey Morris
On May 1, 2012, at 06:40 , Thibault Martin-Lagardette wrote: > The problem in the end is that not only do I have a visual glitch, but this > also feels like a very hacky/dirty solution, and hence, not the way to go. > I feel like I probably should not be trying to hide columns while some others >

Thread never gets to fbDidLogin and accessToken is null when appDidBecomeActive after hit ok on fb login screen

2012-05-06 Thread Michele Cleary
I'm working on an app that uses the FB static sdk corrected for ARC.  The user logs in, but the thread never gets to fbDidLogin.  Also, when I get the accessToken, it's null.  I really hope someone sees an issue with the following: my ImportPic2VC.m: *