> On 25 Jan 2017, at 10:33, John Brownie wrote:
>
> Thanks, that does it for me, though I had to qualify the Unmanaged with a
> type in the first part.
>
> Rien wrote:
>> For the context I passed in:
>>
>> UnsafeMutableRawPointer(Unmanaged.passUnretained(self).toOpaque())
>>
>> And to get t
On 25 Jan 2017, at 07:49, John Brownie via swift-users
wrote:
> My macOS app shows a representation of the contents of various folders, so
> using FSEvents to track modifications from outside the app seemed to be the
> way to go. I am running into difficulty with writing the code with a
> ca
Thanks, that does it for me, though I had to qualify the Unmanaged with
a type in the first part.
Rien wrote:
For the context I passed in:
UnsafeMutableRawPointer(Unmanaged.passUnretained(self).toOpaque())
And to get the context back inside the callback:
let ourself = Unmanaged< … your type
My macOS app shows a representation of the contents of various folders,
so using FSEvents to track modifications from outside the app seemed to
be the way to go. I am running into difficulty with writing the code
with a callback, all in Swift. I must be doing something wrong, as I get
a crash i