[futurebasic] RE: FBtoC: incompatible type for argument 3 of 'CTRunGetPositions'

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 2009 : Group Archive : Group : All Groups

From: "Edwards, Waverly" <Waverly.Edwards@...>
Date: Mon, 31 Aug 2009 20:47:36 -0500
Oh, darn.  I just remembered, I can use the passthrough functionality until its fixed.
I've been racking my brain for about 20 minutes and as soon as I send the email, the answer came to me.
An FB solution would be ideal but I can work with a C (passthrough) solution


W.
________________________________________
From: Edwards, Waverly
Sent: Monday, August 31, 2009 9:43 PM
To: FBList
Subject: FBtoC: incompatible type for argument 3 of 'CTRunGetPositions'

I've run into a problem that I would like to report and can not figure out how to overcome (get around)

The error message for the below code is:  incompatible type for argument 3 of 'CTRunGetPositions'
I've provided the C equivalent and the translation that FBtoC provides.

If someone would recommend a workaround until this is fixed, it would be much appreciated.
I've run out of ideas.

Thanks,


W.

---------------


include "Tlbx CoreText.incl"


dim as CFRange  runRange
dim as CTRunRef lineRun
dim as CGPoint  runPosition

CTRunGetPositions( lineRun, runRange, @runPosition)

/*

  C equivalent:  CTRunGetPositions( lineRun, runRange, &runPosition);
  Translates to: CTRunGetPositions( lineRun, *((CFRange*)&runRange), *((CGPoint*)(void*)&runPosition) );

*/