Re: [swift-users] XML parsing on Linux, with Swift 3.1

2017-09-06 Thread Georgios Moschovitis via swift-users
FWIW, I also prefer snake_case, but camelCase is unfortunately the standard 
convention in Swift so I use that.
Also, I avoid using libraries that don’t follow standard conventions.

-g.


___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] XML parsing on Linux, with Swift 3.1

2017-09-06 Thread Georgios Moschovitis via swift-users
> XMLParser’s delegate is unowned, so it’s being deallocated when you exit the 
> current scope. Hold on to it with a strong reference:
> 
> let delegate = ParserDelegate()
> xmlParser.delegate = delegate

Wow!
Need to brush-up my understanding of Swift ‘pointers’

Thank you.___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] Custom operators from a module

2017-09-06 Thread Howard Lovatt via swift-users
Thanks Jordan. Turns out I had two problems:

  1. I had used ~> which is used in the library (but Xcode didn't tell me
about the redefinition).
  2. Once Xcode had decided that there was an error it wouldn't clear; but
when I quit Xcode and went back in it went away.

Thanks for your suggestion of logging a bug, reducing the problem to bug
form really helped.

  -- Howard.

On 7 September 2017 at 07:36, Howard Lovatt via swift-users <
swift-users@swift.org> wrote:

> I have a custom operator defined in a module and in my XCTest I import
> that module. In the tests the compiler says that the operator isn't
> defined. If I define the operator manually in the tests then it works.
>
> So what is going on?
>
> -- Howard.
>
> On 7 Sep 2017, at 3:45 am, Jordan Rose  wrote:
>
> It's actually the other way around: *all* operator declarations are
> exported from a module, all the time, even if the functions that implement
> them aren't. This is probably a model we should improve, but it's been that
> way since Swift 1.
>
> Jordan
>
>
> On Sep 6, 2017, at 02:08, Howard Lovatt via swift-users <
> swift-users@swift.org> wrote:
>
> Hi All,
>
> I am trying to use a custom operator imported from a module, unfortunately
> you can't add public to the operators definition and therefore it isn't
> exported from the module.
>
> I can manually redefine the operator in the module where the operator is
> used, but that isn't very satisfactory - is there a better way?
>
> Thanks in advance,
>
>   -- Howard.
> ___
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
>
>
>
> ___
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
>
>
___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] Custom operators from a module

2017-09-06 Thread Howard Lovatt via swift-users
I have a custom operator defined in a module and in my XCTest I import that 
module. In the tests the compiler says that the operator isn't defined. If I 
define the operator manually in the tests then it works. 

So what is going on?

-- Howard. 

> On 7 Sep 2017, at 3:45 am, Jordan Rose  wrote:
> 
> It's actually the other way around: all operator declarations are exported 
> from a module, all the time, even if the functions that implement them 
> aren't. This is probably a model we should improve, but it's been that way 
> since Swift 1.
> 
> Jordan
> 
> 
>> On Sep 6, 2017, at 02:08, Howard Lovatt via swift-users 
>>  wrote:
>> 
>> Hi All,
>> 
>> I am trying to use a custom operator imported from a module, unfortunately 
>> you can't add public to the operators definition and therefore it isn't 
>> exported from the module.
>> 
>> I can manually redefine the operator in the module where the operator is 
>> used, but that isn't very satisfactory - is there a better way?
>> 
>> Thanks in advance,
>> 
>>   -- Howard.
>> ___
>> swift-users mailing list
>> swift-users@swift.org
>> https://lists.swift.org/mailman/listinfo/swift-users
> 
___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] Custom operators from a module

2017-09-06 Thread Jordan Rose via swift-users
I just tried it myself with a framework and app target and it worked. Can you 
reproduce what you’re seeing in a simple project and file a bug report at 
https://bugs.swift.org  ?

Sorry for the trouble!
Jordan


> On Sep 6, 2017, at 13:35, Howard Lovatt  wrote:
> 
> I have a custom operator defined in a module and in my XCTest I import that 
> module. In the tests the compiler says that the operator isn't defined. If I 
> define the operator manually in the tests then it works. 
> 
> So what is going on?
> 
> -- Howard. 
> 
> On 7 Sep 2017, at 3:45 am, Jordan Rose  > wrote:
> 
>> It's actually the other way around: all operator declarations are exported 
>> from a module, all the time, even if the functions that implement them 
>> aren't. This is probably a model we should improve, but it's been that way 
>> since Swift 1.
>> 
>> Jordan
>> 
>> 
>>> On Sep 6, 2017, at 02:08, Howard Lovatt via swift-users 
>>> > wrote:
>>> 
>>> Hi All,
>>> 
>>> I am trying to use a custom operator imported from a module, unfortunately 
>>> you can't add public to the operators definition and therefore it isn't 
>>> exported from the module.
>>> 
>>> I can manually redefine the operator in the module where the operator is 
>>> used, but that isn't very satisfactory - is there a better way?
>>> 
>>> Thanks in advance,
>>> 
>>>   -- Howard.
>>> ___
>>> swift-users mailing list
>>> swift-users@swift.org 
>>> https://lists.swift.org/mailman/listinfo/swift-users 
>>> 
>> 

___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] Custom operators from a module

2017-09-06 Thread Jordan Rose via swift-users
It's actually the other way around: all operator declarations are exported from 
a module, all the time, even if the functions that implement them aren't. This 
is probably a model we should improve, but it's been that way since Swift 1.

Jordan


> On Sep 6, 2017, at 02:08, Howard Lovatt via swift-users 
>  wrote:
> 
> Hi All,
> 
> I am trying to use a custom operator imported from a module, unfortunately 
> you can't add public to the operators definition and therefore it isn't 
> exported from the module.
> 
> I can manually redefine the operator in the module where the operator is 
> used, but that isn't very satisfactory - is there a better way?
> 
> Thanks in advance,
> 
>   -- Howard.
> ___
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] Writing a pod catcher for iOS

2017-09-06 Thread Jeff Kelley via swift-users
Incidentally, the book *iOS 10 SDK Development
* by Chris Adamson
walks you through building a podcast player. If you go to the linked
product page, you can even see some livestream captures on Vimeo for free
that cover a lot of this material.


Jeff Kelley

slauncha...@gmail.com | @SlaunchaMan  |
jeffkelley.org

On Fri, Sep 1, 2017 at 3:03 PM, Nicholas Acosta via swift-users <
swift-users@swift.org> wrote:

> Good afternoon, I was wondering if anyone can help me with creating a
> podcast/RSS reader in swift. I have been taking basic iOS courses and
> learning how to use Xcode. I am fully comfortable with using Xcode and the
> templates that are available in iOS. I am also familiar with the frameworks
> for audio and video in iOS. Now, I want to take it to the next level and
> create my own pod cast/RSS reader for the iPhone. I have been trying to do
> some research for a a while and nothing has turned up. Can someone help? I
> really enjoy using swift and I am just trying to learn as I go.
>
> Thank you.
>
> Sent from my iPhone
> ___
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
>
___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


[swift-users] Custom operators from a module

2017-09-06 Thread Howard Lovatt via swift-users
Hi All,

I am trying to use a custom operator imported from a module, unfortunately
you can't add public to the operators definition and therefore it isn't
exported from the module.

I can manually redefine the operator in the module where the operator is
used, but that isn't very satisfactory - is there a better way?

Thanks in advance,

  -- Howard.
___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users