|
Re: NSAlert boxes ...
Normal rules require that you either autorelease it or release it when you’re done (assuming manual MM of course).
If no autorelease or release was required, then that would be an exception to
Normal rules require that you either autorelease it or release it when you’re done (assuming manual MM of course).
If no autorelease or release was required, then that would be an exception to
|
By
Graham Cox
·
#1196
·
|
|
Re: NSAlert boxes ...
Sorry, A bit groggy here. If my previous assumption that autorelease isn’t needed is incorrect, then it might be that the instance will be retained until the reference to it is cleared or the
Sorry, A bit groggy here. If my previous assumption that autorelease isn’t needed is incorrect, then it might be that the instance will be retained until the reference to it is cleared or the
|
By
Alex Zavatone
·
#1195
·
|
|
Re: NSAlert boxes ...
Hi Peter,
FWIW, I’ve always done exactly the same as this too, and have never had an issue.
My understanding (which may be wrong) is that the modal loop that runs the alert temporarily retains it,
Hi Peter,
FWIW, I’ve always done exactly the same as this too, and have never had an issue.
My understanding (which may be wrong) is that the modal loop that runs the alert temporarily retains it,
|
By
Graham Cox
·
#1194
·
|
|
Re: NSAlert boxes ...
My expectation is that autorelease is not needed. In any case, if you do use the memory graph debugger to see if it stays allocated or not, and if autorelease is needed, please let us know.
My expectation is that autorelease is not needed. In any case, if you do use the memory graph debugger to see if it stays allocated or not, and if autorelease is needed, please let us know.
|
By
Alex Zavatone
·
#1193
·
|
|
Re: NSAlert boxes ...
Why are you making it autorelease?
Run your method, display and dispose of the alert and then while your app is still running click on the Memory Graph Debugger icon in the debug bar. Look at your
Why are you making it autorelease?
Run your method, display and dispose of the alert and then while your app is still running click on the Memory Graph Debugger icon in the debug bar. Look at your
|
By
Alex Zavatone
·
#1192
·
|
|
Re: NSAlert boxes ...
Thanks Sandor.
My use of alert is very tightly scoped - and only used once - and not passed on.
Many thanks for the link.
Peter
Thanks Sandor.
My use of alert is very tightly scoped - and only used once - and not passed on.
Many thanks for the link.
Peter
|
By
Peter Hudson
·
#1191
·
|
|
Re: NSAlert boxes ...
Peter,
You may have to dispose of it yourself or maybe ARC will take care of it for you. If you’re writing MRR (not ARC) code you always have to -release/-autorelease objects you own (create).
Peter,
You may have to dispose of it yourself or maybe ARC will take care of it for you. If you’re writing MRR (not ARC) code you always have to -release/-autorelease objects you own (create).
|
By
Sandor Szatmari
·
#1190
·
|
|
NSAlert boxes ...
Hi There
I see from the docs that when you create an NSAlert that you should dispose of it yourself.
My code for creating a simple alert and using it looks like this :-
NSAlert *alert = [[[NSAlert
Hi There
I see from the docs that when you create an NSAlert that you should dispose of it yourself.
My code for creating a simple alert and using it looks like this :-
NSAlert *alert = [[[NSAlert
|
By
Peter Hudson
·
#1189
·
|
|
Re: Auto layout help
And I found the missing piece. I was failing to set translatesAutoresizingMaskIntoConstraints to false for one of the views. Doing that makes it all work.
John
And I found the missing piece. I was failing to set translatesAutoresizingMaskIntoConstraints to false for one of the views. Doing that makes it all work.
John
|
By
John Brownie
·
#1188
·
|
|
Re: Auto layout help
Further digging leaves me more confused. Because I'm supporting 10.9, there are various features I can't use, so I'm stuck with the auto layout basics, and it's hard to find a good explanation of how
Further digging leaves me more confused. Because I'm supporting 10.9, there are various features I can't use, so I'm stuck with the auto layout basics, and it's hard to find a good explanation of how
|
By
John Brownie
·
#1187
·
|
|
Auto layout help
I have my web view displaying correctly, but I've run into a problem in getting the auto layout constraints working correctly. Basically, I build the appropriate web view as a subview of a custom
I have my web view displaying correctly, but I've run into a problem in getting the auto layout constraints working correctly. Basically, I build the appropriate web view as a subview of a custom
|
By
John Brownie
·
#1186
·
|
|
Re: How to present a web view while supporting 10.9?
Thanks for all the tips. I have it all worked out now.
John
Jens Alfke wrote on 7/2/20 21:39:
--
John Brownie
Mussau-Emira language, New Ireland Province, Papua New Guinea
Kouvola, Finland
Thanks for all the tips. I have it all worked out now.
John
Jens Alfke wrote on 7/2/20 21:39:
--
John Brownie
Mussau-Emira language, New Ireland Province, Papua New Guinea
Kouvola, Finland
|
By
John Brownie
·
#1185
·
|
|
Re: How to present a web view while supporting 10.9?
You'll need two code paths, one that instantiates and runs a WebView, the other that instantiates and runs a WKWebView. Their APIs and functionality are not identical, so it's not just a question of
You'll need two code paths, one that instantiates and runs a WebView, the other that instantiates and runs a WKWebView. Their APIs and functionality are not identical, so it's not just a question of
|
By
Jens Alfke
·
#1184
·
|
|
Re: How to present a web view while supporting 10.9?
Yes I could have been more specific, everything worked, all be it with warnings, with both classes of web views being instantiated in code.
Sandor
Yes I could have been more specific, everything worked, all be it with warnings, with both classes of web views being instantiated in code.
Sandor
|
By
Sandor Szatmari
·
#1183
·
|
|
Re: ***UNCHECKED*** Re: [cocoa-dev] How to present a web view while supporting 10.9?
Yes. Prior to 10.12, WKWebView was not available in Interface Builder and could only be instantiated in code.
-Owen
Yes. Prior to 10.12, WKWebView was not available in Interface Builder and could only be instantiated in code.
-Owen
|
By
Owen Hartnett
·
#1182
·
|
|
Re: How to present a web view while supporting 10.9?
I should note that, once I put the WKWebView into the window, there is an error that I hadn't noticed before:
error: Class Unavailable: WKWebView before macOS 10.12 (NSCoding support was broken in
I should note that, once I put the WKWebView into the window, there is an error that I hadn't noticed before:
error: Class Unavailable: WKWebView before macOS 10.12 (NSCoding support was broken in
|
By
John Brownie
·
#1181
·
|
|
Re: How to present a web view while supporting 10.9?
Thanks for the reply.
Sandor Szatmari wrote on 6/2/20 20:51:
I'm still on 10.14.6, Xcode 11.0, current SDK, which I assume is 10.14 (I can't see an option to choose anything but a platform in the SDK
Thanks for the reply.
Sandor Szatmari wrote on 6/2/20 20:51:
I'm still on 10.14.6, Xcode 11.0, current SDK, which I assume is 10.14 (I can't see an option to choose anything but a platform in the SDK
|
By
John Brownie
·
#1180
·
|
|
Re: How to present a web view while supporting 10.9?
What SDK are you building against?
I assuming deployment target of 10.9 and not earlier…
What is the exact problem your having? Is it just warnings, or are there compile/link/runtime errors…
I
What SDK are you building against?
I assuming deployment target of 10.9 and not earlier…
What is the exact problem your having? Is it just warnings, or are there compile/link/runtime errors…
I
|
By
Sandor Szatmari
·
#1179
·
|
|
Is it necessary to suspend/resume a dispatch queue/source on sleep/wake notifications?
Does anyone know if it is necessary to dispatch_suspend/resume a queue or source when sleep/wake notifications triggered in a macOS app?
I've read the docs and done some searching but couldn't find
Does anyone know if it is necessary to dispatch_suspend/resume a queue or source when sleep/wake notifications triggered in a macOS app?
I've read the docs and done some searching but couldn't find
|
By
Matt DeFoor
·
#1178
·
|
|
How to present a web view while supporting 10.9?
My app currently supports 10.9, and I want to add a feature that displays an HTML document stored locally (in the bundle). The obvious way is to have a window which contains a web view. However,
My app currently supports 10.9, and I want to add a feature that displays an HTML document stored locally (in the bundle). The obvious way is to have a window which contains a web view. However,
|
By
John Brownie
·
#1177
·
|