Xcode can't properly parse the C header to show me the Swift signature, but if
I try calling it like this:
let p = lgs_notify_params_t(notify: lgs_notify_did_enter_background)
lgs_notify(self.ctx, p)
I get this error:
Cannot convert value of type 'lgs_notify_params_t' to expected argume
> On Nov 29, 2017, at 16:23 , Jonathan Prescott wrote:
>
> As a general question since I’m just getting into Swift frameworks, could the
> framework architecture not be right? When I build a
> non-Swift(C/C++/Obj-C/Obj-C++/other language/etc) based framework using Xcode
> to build the frame
Ah, I see.
So, here's my issue. I recently ported some C code for satellite position
prediction to Swift. This code used fmod() a lot. I had thought fmod() was just
% for floats, but I see now it's not.
What is truncatingRemainder in all this? It would be great if there were a
documentation se
> On Sep 13, 2017, at 18:59 , Jon Shier wrote:
>
> I think there’s something strange with popFirst. It doesn’t show up in
> the autocomplete in Xcode, but it compiles, and popLast doesn’t throw the
> same error. removeFirst doesn’t either, though it’s unsafe. Weird.
extension
Array
{
Yeah, that's not it. I made the change you suggested, I get the same error.
> On Sep 13, 2017, at 18:11 , Zhao Xin wrote:
>
> Change `self` to `ModelFetcher`. You are calling a class static property, not
> a class instance property.
>
> Zhao Xin
>
> On Thu, Sep 14, 2017 at 8:37 AM, Rick Mann
Did this change in Swift 4?
I like being able to refer to the class in a class func as "self". If I ever
change the name of the class, or refactor the code, or something, I don't have
to change it in a bunch of places.
> On Sep 13, 2017, at 18:11 , Zhao Xin wrote:
>
> Change `self` to `ModelF
Also, it works fine at a couple of other call sites. Why is this one special?
> On Sep 13, 2017, at 18:11 , Zhao Xin wrote:
>
> Change `self` to `ModelFetcher`. You are calling a class static property, not
> a class instance property.
>
> Zhao Xin
>
> On Thu, Sep 14, 2017 at 8:37 AM, Rick Man
Ah. That's the difference. Okay.
Nevertheless, the Apple docs on the matter are unclear at best
(https://developer.apple.com/library/content/documentation/Swift/Conceptual/BuildingCocoaApps/InteractingWithObjective-CAPIs.html):
"Declarations marked with the dynamic modifier must also be explicit
> On Jun 26, 2017, at 14:05 , Philippe Hausler wrote:
>
>
>
>> On Jun 26, 2017, at 1:47 PM, Roderick Mann wrote:
>>
>>>
>>> On Jun 26, 2017, at 10:20 , Charles Srstka wrote:
>>>
>>> Rats, I was hoping that one of the reasons about being so explicit what
>>> we’re going to access and wher
> On Jun 26, 2017, at 10:20 , Charles Srstka wrote:
>
> Rats, I was hoping that one of the reasons about being so explicit what we’re
> going to access and where with bindMemory() and friends would be to take care
> of these sorts of issues.
>
> In that case, the simplest way to do it is prob
> On Jun 26, 2017, at 10:20 , Charles Srstka wrote:
>
> Rats, I was hoping that one of the reasons about being so explicit what we’re
> going to access and where with bindMemory() and friends would be to take care
> of these sorts of issues.
>
> In that case, the simplest way to do it is prob
Thanks, I'll give that a try.
> On Jun 25, 2017, at 23:11 , Charles Srstka wrote:
>
>> On Jun 26, 2017, at 12:00 AM, Roderick Mann via swift-users
>> wrote:
>>
>> I mean, it's as straightforward as my example. I have a Data of arbitrary
>> size
I mean, it's as straightforward as my example. I have a Data of arbitrary size
(anywhere from 3 to 29 bytes, let's say). The last two bytes form a UInt16 CRC.
I need to get those last two out and compare them against the CRC I compute for
the rest of the bytes.
Having said that, I just used wit
> On Nov 21, 2016, at 13:14 , Nevin Brackett-Rozinsky
> wrote:
>
> I don’t see what there is to be confused about.
>
> A “literal” is literally a bunch of characters in source code. The compiler
> interprets those characters as representing whatever type is appropriate to
> the context.
>
>
> On Sep 9, 2016, at 15:46 , Joe Groff wrote:
>
>
>> On Sep 9, 2016, at 2:02 PM, Kevin Nattinger via swift-users
>> wrote:
>>
>> You’ll need to explicitly add the “as NSNumber” now.
>>
>> https://github.com/apple/swift-evolution/blob/master/proposals/0072-eliminate-implicit-bridging-convers
15 matches
Mail list logo