Re: [swift-users] Problem with Access Control and Extensions

2017-09-20 Thread Rick Aurbach via swift-users
/* ... */ > } > } > ``` > > Am 20. September 2017 um 21:41:31, Rick Aurbach via swift-users > (swift-users@swift.org <mailto:swift-users@swift.org>) schrieb: > >> I am trying to write an extension to a UIKit class, but am running into a

[swift-users] Problem with Access Control and Extensions

2017-09-20 Thread Rick Aurbach via swift-users
I am trying to write an extension to a UIKit class, but am running into a can’t-win situation: The code I ‘want’ to write looks like: public extension UISplitViewController { override public func viewDidLoad() { super.viewDidLoad() if UIDevice.current.use

Re: [swift-users] Why does this leak?

2017-03-28 Thread Rick Aurbach via swift-users
This is getting interesting. I added your suggested test code (set to execute once): class FontSelectorDialog : UITableViewController { static let chooser : ColorChooser = ColorChooser() override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(a

Re: [swift-users] Why does this leak?

2017-03-27 Thread Rick Aurbach via swift-users
t; > - Dave Sweeris > > On Mar 27, 2017, at 13:31, Rick Aurbach via swift-users > mailto:swift-users@swift.org>> wrote: > >> Okay, I downloaded the latest Xcode from the developer site. (The download >> page said it was 8.3beta5, but the version info called it 8

Re: [swift-users] Why does this leak?

2017-03-27 Thread Rick Aurbach via swift-users
artifact. Suggestions?? Cheers, Rick Aurbach > On Mar 27, 2017, at 3:01 AM, Alex Blewitt wrote: > > >> On 26 Mar 2017, at 18:43, Rick Aurbach via swift-users >> wrote: >> >> I have a situation where I have a leak that I do not understand. I would be >> ve

[swift-users] Why does this leak?

2017-03-26 Thread Rick Aurbach via swift-users
I have a situation where I have a leak that I do not understand. I would be very grateful if someone could explain it to me and offer an idea of how I can make the pattern work without leaking: Consider two code snippets, the first of which leaks, while the second does not. Case 1: This example

Re: [swift-users] Accessing the bundle of the call-site

2016-12-02 Thread Rick Aurbach via swift-users
Jordan, You are oh, so right! Thank you for helping me resolve a particularly major piece of stupidity on my part. The following code seems (subject to testing, of course), achieve what I’m looking for: public extension String { public func localized(dsoHandle : UnsafeRawPoint

Re: [swift-users] Accessing the bundle of the call-site

2016-12-02 Thread Rick Aurbach via swift-users
t's unique to the current dylib. Parsing out a module name > seems incredibly brittle; the form of #function is not guaranteed to be > stable or useful across Swift versions. > > Jordan > > >> On Dec 2, 2016, at 10:35, Rick Aurbach via swift-users >> mailto:swift-

Re: [swift-users] Accessing the bundle of the call-site

2016-12-02 Thread Rick Aurbach via swift-users
That’s clever! Thank you; I’d probably never have thought of that. Cheers, Rick Aurbach > On Dec 2, 2016, at 12:25 PM, Greg Parker wrote: > >> >> On Dec 2, 2016, at 9:44 AM, Rick Aurbach via swift-users >> mailto:swift-users@swift.org>> wrote: >> >>

[swift-users] Accessing the bundle of the call-site

2016-12-02 Thread Rick Aurbach via swift-users
Does anyone know if it is possible to do the following in Swift 3.x? (I’ll describe the issue abstractly first, then give the use-case.) Consider two modules: A and B. A could be either the main module of an application or an embedded framework. B is a different embedded framework. Now A contai