Re: Alerts in Xcode 11

2019-09-30 Thread Doug Hardie via Cocoa-dev
I tried that and swift complains that self is not defined. This is not in a view controller but a stand alone function used in many view controllers. Generally it is used during a segue, but I added one in a view controller to a button action, not part of a segue and it dismissed the alert

Re: Alerts in Xcode 11

2019-09-30 Thread David Duncan via Cocoa-dev
Instead of creating a new window and a root view controller in order to present your alert, just use (assuming self is a UIViewController) self.present(, animated: completion: …) > On Sep 30, 2019, at 5:48 PM, Doug Hardie wrote: > > Not sure how to do that. It's not in any view controller as

Re: Thoughts on ARC

2019-09-30 Thread Jens Alfke via Cocoa-dev
> On Sep 30, 2019, at 4:57 PM, Sam Ryan wrote: > > I tried a completely new approach - Electron. I have found Electron to be > surprisingly quick to prototype, easy to bridge to c++, and is cross platform > (non mobile at least). I would not have recommended a non-native approach > until

Re: Thoughts on ARC

2019-09-30 Thread Sam Ryan via Cocoa-dev
No apology necessary, I'm pained by the same problems as you mentioned! On Tue, 1 Oct 2019 at 14:00, Jens Alfke wrote: > > > On Sep 30, 2019, at 4:57 PM, Sam Ryan wrote: > > I tried a completely new approach - Electron. I have found Electron to be > surprisingly quick to prototype, easy to

Re: Thoughts on ARC

2019-09-30 Thread Sam Ryan via Cocoa-dev
I have recently looked at utilising Swift to update an old Carbon based application. I stopped pursuing this path Swiftly, in part because of lack of good support for sockets and generally problematic use of CG* code. I tried a completely new approach - Electron. I have found Electron to be

Re: Thoughts on ARC

2019-09-30 Thread Jean-Daniel via Cocoa-dev
> Le 30 sept. 2019 à 17:16, Robert Walsh via Cocoa-dev > a écrit : > > > Swift may be the solution, but it's built on a weak foundation. It makes > cross-platform development almost impossible. The TIOBE index shows Swift > declining (and Objective-C increasing). So, maybe it isn't. > > I

Re: Alerts in Xcode 11

2019-09-30 Thread Doug Hardie via Cocoa-dev
Not sure how to do that. It's not in any view controller as it is used in virtually all of the various view controllers. That's why I wanted it as a function. -- Doug > On 30 September 2019, at 14:44, David Duncan wrote: > > What happens if you present it over your normal view controller

Re: Alerts in Xcode 11

2019-09-30 Thread David Duncan via Cocoa-dev
What happens if you present it over your normal view controller hierarchy instead of using another window? Has your application adopted UIWindowScene? > On Sep 30, 2019, at 5:36 PM, Doug Hardie via Cocoa-dev > wrote: > > I have some code that presents an alert to the user with information

Alerts in Xcode 11

2019-09-30 Thread Doug Hardie via Cocoa-dev
I have some code that presents an alert to the user with information they need, and an OK button to clear it. It works fine in the previous Xcode versions. However, after upgrading to 11, it now displays the alert and then immediately clears it. This happens both in the simulator and on a

Re: Thoughts on ARC

2019-09-30 Thread Jens Alfke via Cocoa-dev
> On Sep 30, 2019, at 8:16 AM, Robert Walsh via Cocoa-dev > wrote: > > however, to use it to do anything other than building a desktop or IOS GUI > application seems to result in code with messy syntax and what seem to me to > be hacks in order to bridge between NS* and CG* code. (Lots of

Re: Thoughts on ARC

2019-09-30 Thread Robert Walsh via Cocoa-dev
Swift may be the solution, but it's built on a weak foundation. It makes cross-platform development almost impossible. The TIOBE index shows Swift declining (and Objective-C increasing). So, maybe it isn't. I don't yet have a lot of experience with Swift, but I would already argue that Swift