Error : Unable to bind foreign handler
Posted: Thu Feb 06, 2020 3:59 pm
Hi,
Would someone be kind enough to have a look at the following foreign handler definition to see where my error is ?
The is being called by this line :
sEventstore is declared with and tAuthorisationCode with
sEventstore has been set to an EKEventstore object using calls to "alloc" and "init". If is tested as not nothing before the call to ObjC_EKEventStoreAuthStatus is made. The first time I initialised sEventstore I was prompted to provide permission so I believe that the creation of the object was successful.
I have been plugging away at this one call for most of the day and do not what else to try. Any thoughts?
Would someone be kind enough to have a look at the following foreign handler definition to see where my error is ?
Code: Select all
// Check authorisation to access Events - FAILS ???
// In Objective-C the type returned from authorizationStatusForEntityType is defined as NSInteger
// which is an int on 32bit processor or long on 64bit processor.
private foreign handler ObjC_EKEventStoreAuthStatus(in pObj as ObjcID,in pEKEntityMaskEvent as CUint) \
returns CULong \
binds to "objc:EventKit>EKEventstore.-authorizationStatusForEntityType:"
Code: Select all
put ObjC_EKEventStoreAuthStatus(sEventStore, 0) into tAuthorisationCode
Code: Select all
private variable sEventStore as optional ObjcObject
Code: Select all
variable tAuthorisationCode as optional Integer
I have been plugging away at this one call for most of the day and do not what else to try. Any thoughts?