[vtkusers] Mac OS X x86_64 with Qt-4.5.x,vtk-5.3.x

Sean McBride sean at rogue-research.com
Tue Nov 25 10:44:52 EST 2008


On 11/20/08 8:48 PM, Clinton Stimpson said:

>> 'int' is no good, because in the 64 bit ABI, an 'int' is still 32 bit,
>> but a pointer (like 'id') is 64 bit.  I suggest using NSUInteger because
>> it is always the same size as a pointer (32 in 32bit and 64 in 64bit). 
>> Likewise, %i should be %lu.
>>   
>Thanks for clarifying that.  I assume you'll have to add ifdefs or 
>something since NSUInteger is new for the 10.5 SDK?

Actually, that's there already, see:
Rendering/vtkCocoaMacOSXSDKCompatibility.h

>> Do I understand correctly that this API takes an ASCII string (of a
>> base-10 number) that represents a pointer address?!?  That's strange,
>> no?  This is likely to wreak havoc with Obj-C garbage collection...
>Yes, its a string of a base 10 number which one can extract then 
>reinterpret cast back to a native window system handle.
>The vtkRenderWindow::SetWindowInfo() is called by the GTK, Qt, wx Python 
>codes that interface with VTK.  Of the 3, it looks like Qt is the only 
>one that optionally uses Cocoa now.

Do you happen to know why a string is used?  Seems awfully weird, but I
assume there is a reason.

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada





More information about the vtkusers mailing list