Re: Best Xcode machine mid-2019?

2019-07-02 Thread Alex Zavatone via Cocoa-dev
There used to be a control panel for this but Instruments lets you disable hyper threading and cores that is a systemwide setting. The guys over at PSODFKit got distcc working with ccache for “stupid fast builds” in Objective-C. https://pspdfkit.com/blog/2017/crazy-fast-builds-using-distcc/

Re: ARC problems

2019-09-03 Thread Alex Zavatone via Cocoa-dev
Is it possible to switch out the view controller that i disappearing with another one and see if that also disappears? Is that view controller voiding its own self reference? > On Sep 3, 2019, at 5:18 PM, Turtle Creek Software via Cocoa-dev > wrote: > > The app delegate is NOT being

Re: Cocoa-dev Digest, Vol 16, Issue 72

2019-08-25 Thread Alex Zavatone via Cocoa-dev
> On Aug 25, 2019, at 7:49 PM, Turtle Creek Software via Cocoa-dev > wrote: > >>> Either you have files where ARC is still turned of (via the -fno-arc > option > > Nope, no compiler flags at all. > >>> Make sure you're properly using NSBridgingRetain() etc. (or > the equivalent typecasts)

Re: NSLog displays inconsistent format for NSDate

2019-08-31 Thread Alex Zavatone via Cocoa-dev
Use an NSDateFormatter. Use a format string with at the end ZZZ or if you want the time zone offset added. > On Aug 20, 2019, at 2:50 PM, Carl Hoefs via Cocoa-dev > wrote: > > When printing out an NSDate using NSLog from within Xcode I get: > > "Tue Aug 20 12:32:40 2019" > > When

Re: ARC

2019-08-23 Thread Alex Zavatone via Cocoa-dev
Casey, is this a Mac app or an iOS app? > On Aug 23, 2019, at 4:17 PM, Casey McDermott via Cocoa-dev > wrote: > > We allocate the controller in our app delegate class ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: ARC

2019-08-23 Thread Alex Zavatone via Cocoa-dev
Casey, it it’s an iOS app, read up on strong and weak and use the storyboard to breat your first screen. Assuming it’s an iOS app… Why are you allocating the controller in the app delegate? Are you embedding it in a Nav controller? ARC is fantastic. The view controller is within the

Re: Screensaver icon ?

2019-09-17 Thread Alex Zavatone via Cocoa-dev
Add it in the build phases copy files phase or use the environment variables to build the path in a shell script and run that as part of your runtime build scripts. Sent from my iPhone > On Sep 17, 2019, at 10:20 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > Thanks a lot for the response.

Re: Cocoa-dev Digest, Vol 16, Issue 144

2019-11-14 Thread Alex Zavatone via Cocoa-dev
Not to create a conflict, but I like to think about it this way. I had to do it with my parents as they approached their elderly years and we have to do it whenever the next version of Swift and Xcode come out. A train is moving to a cliff. The cliff is far away but eventually, if you do

Re: Thoughts on Objective-C++

2019-11-13 Thread Alex Zavatone via Cocoa-dev
> On Nov 13, 2019, at 2:43 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > >> be a good time for a SwiftUI pivot. If true, Cocoa is the new Carbon. >> > > I think, eventually, maybe in 5 years' time, that will be the case. > This is really just a guess, I have no insights into Apple's

Re: Thoughts on Objective-C++

2019-11-13 Thread Alex Zavatone via Cocoa-dev
> On Nov 13, 2019, at 6:28 PM, Turtle Creek Software via Cocoa-dev > wrote: > > Convert resources from ResEdit DUDE. This is what, 20 years overdue? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: Swift -> Obj-C: return __kindof Something

2019-11-11 Thread Alex Zavatone via Cocoa-dev
You should be able to look at the header in Swift for your Objective-C class and see what it should be. > On Nov 11, 2019, at 8:06 PM, Steve Christensen via Cocoa-dev > wrote: > > Yep, I understand what it does. I’m trying to get the same class-or-subclass > behavior during compilation. I’d

Re: Permission Denied trying to connect to localhost in unit test

2019-12-13 Thread Alex Zavatone via Cocoa-dev
Is it an https/http error? On iOS, we have to add an exception in the info.plist for ATS (Application Transport Security) to allow http traffic. Is there anything similar on the Mac? Sent from my iPhone > On Dec 12, 2019, at 12:58 PM, Jens Alfke via Cocoa-dev > wrote: > > > >> On Dec

Re: Need for Swift

2019-10-15 Thread Alex Zavatone via Cocoa-dev
The push for server side Swift is interesting in that it embodies the philosophy of moving Swift to other platforms/arenas. Sent from my iPhone > On Oct 15, 2019, at 8:57 AM, Turtle Creek Software via Cocoa-dev > wrote: > > This discussion about Swift vs Objective-C is interesting, but I

Re: Need for Swift

2019-10-15 Thread Alex Zavatone via Cocoa-dev
Sent from my iPhone > On Oct 15, 2019, at 10:37 AM, John Joyce via Cocoa-dev > wrote: > > > >> >> On Oct 15, 2019, at 22:58, Turtle Creek Software via Cocoa-dev >> wrote: >> >> Nobody >> is every going to write a full CAD, project management or business >> accounting app in either

Re: Need for Swift

2019-10-15 Thread Alex Zavatone via Cocoa-dev
> On Oct 15, 2019, at 6:08 PM, Charles Srstka via Cocoa-dev > wrote: > > Seeing lots of `!` in production Swift is a code smell. > > Charles I wouldn’t call it a code smell. It’s worse. It’s actually asking for a crash if everything doesn’t work out perfectly and an expected result is

Re: Need for Swift

2019-10-15 Thread Alex Zavatone via Cocoa-dev
Sent from my iPhone > On Oct 15, 2019, at 7:25 AM, Sandor Szatmari > wrote: > > Obj-C represents the freedom for me to write bad code if I need to… Believe me, I have been living in the results of the bad code that Swift allows developers to create. Debugging how a tap in a

Re: Need for Swift

2019-10-14 Thread Alex Zavatone via Cocoa-dev
> On Oct 14, 2019, at 1:25 PM, Carl Hoefs via Cocoa-dev > wrote: > > The group that likes Obj-C sees Swift as being "arbitrarily syntactical" with > the syntax of the language getting in the way of programming. (There is a > third group that likes both languages, but it is very small.) I

Re: Need for Swift

2019-10-15 Thread Alex Zavatone via Cocoa-dev
> On Oct 15, 2019, at 1:37 AM, Quincey Morris via Cocoa-dev > mailto:cocoa-dev@lists.apple.com>> wrote: > > The really important thing about using Swift is that you *have to* learn to > change the way you think about dealing with nil values. And it’s a fucking cumbersome pain in the ass.

Re: Need for Swift

2019-10-16 Thread Alex Zavatone via Cocoa-dev
> On Oct 16, 2019, at 4:49 AM, Stephane Sudre via Cocoa-dev > wrote: > > Why do Swift developers think it's mandatory to write code that is illegible? > Is Swift mainly used by freelances or consultants that will not have > to maintain the software? The zest to do things in a way, “because

Re: Alerts in Xcode 11

2019-10-16 Thread Alex Zavatone via Cocoa-dev
Yeah, one thing you need to do is get the key window’s presentedViewController. You can do this from the shared applicationDelegate. Create a standalone class that gets UIApplication.shared().keywindow.presentedViewController. Think of that as self. And then use that to present the alert.

Re: FYI: info on our scary Mac rebooting iOS testing crash.

2019-10-18 Thread Alex Zavatone via Cocoa-dev
ching the Mac reboot when the WindowServer has over 260,000 mach ports allocated, I'll happily post a link. Cheers, Alex Zavatone > On Oct 17, 2019, at 12:07 PM, Alex Zavatone via Cocoa-dev > wrote: > > As a background, I mentioned that we occasionally have these scary crashes > w

FYI: info on our scary Mac rebooting iOS testing crash.

2019-10-17 Thread Alex Zavatone via Cocoa-dev
As a background, I mentioned that we occasionally have these scary crashes while running our iOS tests that either reboot your Mac or crash the user process out to the login screen. Yesterday, I noticed that I could not run our tests at all without crashing around a certain area and on 3

Re: iOS play microphone to headphones

2019-10-08 Thread Alex Zavatone via Cocoa-dev
Doesn’t the user have to select the output device? Sent from my iPhone > On Oct 7, 2019, at 8:07 PM, Jens Alfke via Cocoa-dev > wrote: > > > >> On Oct 6, 2019, at 1:07 PM, Eric Dolecki via Cocoa-dev >> wrote: >> >> Quick Swift question. Is it fairly easy to take audio and play it to >>

Re: Alerts in Xcode 11

2019-10-09 Thread Alex Zavatone via Cocoa-dev
Just try it with the window code commented out. In any case, where you do have your code with the window, I would expect that you would make the window key and visible not manually adjust its layer and on dismiss, simply resign. Alex Zavatone Sent from my iPhone > On Sep 30, 2019, at 4:48

Re: Thoughts on Cocoa source code

2019-10-11 Thread Alex Zavatone via Cocoa-dev
It does the useful thing on 10.15. I just had to add some scene code to our iOS app that had availability indicators around the methods indicating to use them on iOS 13 and greater. Sent from my iPhone > On Oct 9, 2019, at 1:39 PM, Aandi Inston via Cocoa-dev > wrote: > > " . Cocoa is part

Re: Need for Swift

2019-10-11 Thread Alex Zavatone via Cocoa-dev
> On Oct 11, 2019, at 10:09 PM, Kirk Kerekes via Cocoa-dev > wrote: > > I would not want to be at the mercy of a vehicle piloted by C++. In the immortal words that I have in an email from John Carmack, “Failure in brakes.dll." ___ Cocoa-dev

Re: Embedded binary is not signed with the same certificate as the parent app

2020-03-03 Thread Alex Zavatone via Cocoa-dev
Why are you copying that app you are trying to build? Sent from my iPhone > On Mar 3, 2020, at 1:11 PM, Gabriel Zachmann wrote: > > Thanks a lot for your response! > > Here is the screenshot: > > > In case the mailing list deletes the screenshot, here is a link : > >

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Alex Zavatone via Cocoa-dev
Not sure about this, but in Objective-C, you’re not supposed to start methods with new. > On Apr 29, 2020, at 4:07 PM, Carl Hoefs via Cocoa-dev > wrote: > NSTimer *newTimer = [NSTimer timerWithTimeInterval:1.0 // should be 1/sec

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Alex Zavatone via Cocoa-dev
I used your code in an iOS project and it works as expected. 2020-04-29 16:14:02.254107-0500 Timer[83275:13268128] Wed Apr 29 16:14:02 2020 2020-04-29 16:14:03.254048-0500 Timer[83275:13268128] Wed Apr 29 16:14:03 2020 2020-04-29 16:14:04.253957-0500 Timer[83275:13268128] Wed Apr 29 16:14:04 2020

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Alex Zavatone via Cocoa-dev
For giggles, comment out the current code and replace it with exactly the same code. Or put it in a new class and call the new class. > On Apr 29, 2020, at 4:45 PM, Carl Hoefs via Cocoa-dev > wrote: > > When everything goes wonky... it's time to reinstall all of Xcode...! > > *sigh* >

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Alex Zavatone via Cocoa-dev
Are you ever removing your timers? Quit Xcode, reload the project and see if the same thing happens. > On Apr 29, 2020, at 3:36 PM, Carl Hoefs via Cocoa-dev > wrote: > > When I issue NSTimer's +timerWithTimeInterval: method, I'm getting > unexpected timer firing times (20X faster than

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Alex Zavatone via Cocoa-dev
Just ot be safe, reboot your Mac to make sure that things aren’t completely borked. I’ve had to do this many times. > On Apr 29, 2020, at 4:26 PM, Carl Hoefs > wrote: > > I accept that NSTimer works as documented! But I allege there must be > something odd about my (inherited) project

Re: [OT] NSTimer +timerWithTimeInterval:

2020-04-29 Thread Alex Zavatone via Cocoa-dev
Sandor, it’s somewhere in the naming guide for the Objectice-C fundamental docs. I could be confusing things though. > On Apr 29, 2020, at 5:27 PM, Sandor Szatmari > wrote: > > Alex, > >> On Apr 29, 2020, at 17:12, Alex Zavatone via Cocoa-dev >> wr

Re: Concurrent loading of images ?

2020-05-12 Thread Alex Zavatone via Cocoa-dev
Care to post a video on a Google drive so that we can see it? One of my tricks (not just mine) is to have a 3 slots of for images, not just 2. When a new image loads, take the foreground one that is blended in to 100%, put an identical one ahead of it. Make the changes to the new and old

Re: Concurrent loading of images ?

2020-05-12 Thread Alex Zavatone via Cocoa-dev
Actually, can’t you disable screen updating while you’re swapping images? > On May 12, 2020, at 3:35 PM, Alex Zavatone via Cocoa-dev > wrote: > > Care to post a video on a Google drive so that we can see it? > > One of my tricks (not just mine) is to have a 3 slots of fo

Re: Concurrent loading of images ?

2020-05-13 Thread Alex Zavatone via Cocoa-dev
One cheap option would be to ease the sliding in to a stop position and have a nice little pause where you swap images. Of course, that’s cheating. > On May 13, 2020, at 3:34 PM, Gabriel Zachmann wrote: > >> >> Care to post a video on a Google drive so that we can see it? > > Good idea -

Re: Concurrent loading of images ?

2020-05-13 Thread Alex Zavatone via Cocoa-dev
Ahh, there’s a jitter when moving. Try creating an async dispatch to a background thread in a block. > On May 13, 2020, at 3:34 PM, Gabriel Zachmann wrote: > >> >> Care to post a video on a Google drive so that we can see it? > > Good idea - here is the video: > >

Re: Xcode Build Location

2020-05-15 Thread Alex Zavatone via Cocoa-dev
There are two more of these groups created Jens that you may find helpful. xc...@apple-dev.groups.io co...@apple-dev.groups.io > On May 15, 2020, at 2:18 PM, Richard Charles via Cocoa-dev > wrote: > > Thanks to everyone for your comments and suggestions. > > I now have my app with

Re: Minimizing my app kills timer ?

2020-05-08 Thread Alex Zavatone via Cocoa-dev
What if you spawned another process (NSTask?) from the screensaver and tested if a timer works in that? It’s hokey as hell, but I use this approach to monitor a running process and do things when its state changes to suspended. See if you can fire off a process and have a timer in it that logs

Re: Minimizing my app kills timer ?

2020-05-08 Thread Alex Zavatone via Cocoa-dev
Oh Steve, which version of MacOS are you seeing this on? > On May 4, 2020, at 8:33 AM, Steve Mills via Cocoa-dev > wrote: > > On May 4, 2020, at 03:28:23, Gabriel Zachmann wrote: >> >> You mean, it could happen that Apple decides to make ScreenSaverView a >> subclass of some class other

Re: Concurrent loading of images ?

2020-05-08 Thread Alex Zavatone via Cocoa-dev
iOS or MacOS? > On May 8, 2020, at 11:53 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > I have kind of a slide-show app. > > Sometimes, when it switches from one image to the next, there is a noticeable > lag when the file size of the next image is very big, say, 50 MB or more. > Sometimes,

Re: Concurrent loading of images ?

2020-05-08 Thread Alex Zavatone via Cocoa-dev
Does this seem related? https://9to5mac.com/2020/04/28/new-bug-found-in-macos-can-quickly-fill-up-storage-when-importing-photos-with-image-capture/ "The problem discovered by the NeoFinder team is that the Mac adds 1.5MB of empty data to each converted photo, making the imported files larger

Re: Open a panel in secondary thread?

2020-03-21 Thread Alex Zavatone via Cocoa-dev
Isn’t the main thread meant for updating the UI? > On Mar 21, 2020, at 7:05 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > Is it possible to open an NSOpenPanel in a secondary thread? > > I create the thread like this: > >directoryScanThread_ = [[NSThread alloc] initWithTarget: self

Re: Open a panel in secondary thread?

2020-03-23 Thread Alex Zavatone via Cocoa-dev
Main queue is analogous to the main thread, but not exactly the same - according to Apple’s docs. Sent from my iPhone > On Mar 23, 2020, at 12:53 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > Thanks a lot for your response. > >> I would not do this. It is widely documented that AppKit

Re: applicationDidFinishLaunching not being called

2020-03-09 Thread Alex Zavatone via Cocoa-dev
Dave, I just selected the AppDelegate in the storyboard in a temp app, deleted it and the AppDelegate methods are skipped. I’m guessing that your answer is the one that’s causing it, as in my suggestions, the console throws a descriptive error message. > On Mar 9, 2020, at 7:31 PM, Dave via

Re: Concurrent loading of images ?

2020-05-08 Thread Alex Zavatone via Cocoa-dev
Using a queue is part of GCD. You should probably not use the main queue since that is analogous to the main thread and the main thread is meant for updating the UI. The good thing here is that you can sort of preload the next image in a queue after your last one has displayed. With a

Re: Finding memory leaks

2020-05-20 Thread Alex Zavatone via Cocoa-dev
Also, in your run scheme, enable the Diagnostics for Logging > Malloc Stack > Live Allocations Only. > On May 20, 2020, at 10:08 AM, Georg Seifert via Cocoa-dev > wrote: > > You need to check the backtrace where the leaking object was created. > Sometimes it points to a line that has nothing

Re: Finding memory leaks

2020-05-20 Thread Alex Zavatone via Cocoa-dev
Do NOT use Instruments. Use the Memory Graph Debugger. It’s in your debugger console near the breakpoint button and View Hierarchy Debugger. Try that first. > On May 20, 2020, at 9:03 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > I have a few stupid questions regarding (potential)

Re: Finding memory leaks

2020-05-20 Thread Alex Zavatone via Cocoa-dev
hs don’t handle C++ > objects very well. It would be nice if they understood shared_ptr & > unique_ptr. > > —Rob > > >> On May 20, 2020, at 9:16 AM, Alex Zavatone via Cocoa-dev >> wrote: >> >> Also, in your run scheme, enable the Diagnostics for Lo

Re: Throttling drawing to vertical refresh

2020-10-18 Thread Alex Zavatone via Cocoa-dev
It shouldn’t be too hard to roll your own simply based on milliseconds of a timer. Even a simple if (myMilliseconds > nextUpdateTime) { [updateObject doThatUpdate]; nextUpdateTime = myMilliseconds + msThrottle; } lets you get a basic throttle. Cheers, Alex Zavatone > On Oct

Re: Question about Info.plists

2020-08-19 Thread Alex Zavatone via Cocoa-dev
I have build scripts that do that based on the # of the git checkins. I’ll send you the projects. > On Aug 19, 2020, at 11:07 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > Question: > > Is there a way to use a key/value that was defined earlier in the plist file > to define a value for a

Re: Question about Info.plists

2020-08-19 Thread Alex Zavatone via Cocoa-dev
ur build machine, this will automatically update the app's build number. If you wish to increment your app's versionnumber, change CFBundleShortVersionString (Bundle versions string, short) in the info.plist manually. > On Aug 19, 2020, at 3:07 PM, Alex Zavatone via Cocoa-dev > wrote: > &

Re: Question about Info.plist's

2020-08-20 Thread Alex Zavatone via Cocoa-dev
I can send anyone who wants it my two projects that increment build numbers if you’re interested. Just let me know. Alex Zavatone > On Aug 19, 2020, at 9:45 PM, Michael Hall via Cocoa-dev > wrote: > > > >> On Aug 19, 2020, at 9:04 PM, Michael Hall wrote: >> >> >> I’m not familiar with

Re: Rotating NSTextField 90 degrees

2020-09-24 Thread Alex Zavatone via Cocoa-dev
http://digerati-illuminatus.blogspot.com/2009/09/how-do-you-rotate-nsbutton-nstextfield.html > On Sep 24, 2020, at 11:09 PM, Carl Hoefs via Cocoa-dev > wrote: > > In my MacOS app I need to display some vertical text (normal text rotated 90 > degrees counterclockwise). > > I don't see

Re: Rotating NSTextField 90 degrees

2020-09-24 Thread Alex Zavatone via Cocoa-dev
Check out frameRotation or myView.wantsLayer = YES; myView.layer.transform = CATransform3DMakeRotation(angle, 0, 0, 1); There is this too. https://developer.apple.com/documentation/appkit/nsview/1483444-rotate

Re: Invalidating UIImageView's image cache

2020-09-22 Thread Alex Zavatone via Cocoa-dev
It’s probably getting the same image from within the bundle based on the path. > On Sep 22, 2020, at 8:12 PM, Eric Lee via Cocoa-dev > wrote: > > Ah maybe it is the use of `imageNamed:`. I believe that caches the image > data in a system cache. Have you tried `imageWithContentsOfFile:`? >

Re: Xcode Archive builds Debug version?

2020-05-25 Thread Alex Zavatone via Cocoa-dev
It’s set in your schemes. Pick your Release configuration. > On May 24, 2020, at 4:54 AM, Sandor Szatmari via Cocoa-dev > wrote: > > Gabriele, > > When you do archive Xcode uses a different build destination. It seems to > use > /Library/Developer/Xcode/Archives > > It builds an Archive

Re: Throttling drawing to vertical refresh

2020-10-23 Thread Alex Zavatone via Cocoa-dev
Just try the simple code I supplied with a 1, 2, second update time. If you find that it doesn’t work, it’s 5 minutes spent. If you find that it does, just figure out the update time that you want. 1/2 a second? 1/10 of a second? The other thing you can have is a “hasTheDataChanged” setting

Re: Throttling drawing to vertical refresh

2020-10-23 Thread Alex Zavatone via Cocoa-dev
Naaah, it’s not that. The OSes draw code already handles that at a much lower level. You’re just creating what is a maximum update throttle. You’re not blitting pixels in a video card driver. You can try my simple approach and just declare the next update time to be the current time + 1

Re: How to parse a log file

2020-10-26 Thread Alex Zavatone via Cocoa-dev
Starting with Gabriel’s comment. We can see that at line 2, we have this. NSCFString characterAtIndex: And on line 1, we have the thrown exception. If I’m correct, the assumption here is thatthe operation is trying to get the first character of a a string at index 0 and there isn’t any, so the

Re: How to parse a log file

2020-10-26 Thread Alex Zavatone via Cocoa-dev
As a note to Jens’s tip, it’s important to keep the .dSWM files for your releases so that you can symbolicate your crash logs. Crashlytics does this for you, but the debug symbols are stripped from released builds to try and prevent people from reverse engineering your code and to make the

Re: How to parse a log file

2020-10-27 Thread Alex Zavatone via Cocoa-dev
If you upload your build (iOS) to the iTunes connect, I do believe that the dSym goes up as well. Look at the build script for Crashlytics. It makes sure to upload your dSyms and does the symbolicating for iOS apps. The process already exists with these and other crash tracking tools. It’s

Re: Funny issue: one line in GUI is grey-ish

2020-08-09 Thread Alex Zavatone via Cocoa-dev
Do you have a view hierarchy inspector so that you can see each of the layers? If you change the color to red, does it appear pink? If it does, one of the layers in the view hierarchy is at a < 1.0 alpha. > On Aug 9, 2020, at 8:48 AM, Gabriel Zachmann wrote: > > Thanks a lot for the quick

Re: Funny issue: one line in GUI is grey-ish

2020-08-09 Thread Alex Zavatone via Cocoa-dev
What are the forecolor and alpha values? Of the text and of the label? Try changing the color to something else and if it’s also lighter, then somewhere you have a 50% alpha value. > On Aug 9, 2020, at 7:58 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > I have a simple app (status bar

Re: Launching another app from mine

2020-06-15 Thread Alex Zavatone via Cocoa-dev
Mac, iOS, WatchOS, iPadOS? TRS-80 Basic? Which platform? > On Jun 15, 2020, at 1:30 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > I would like to launch application B from my application A using Swift. > Both applications are created, compiled, signed, and notarized by me. > Challenge: no

Re: Updating localised auth-prompt strings

2020-06-15 Thread Alex Zavatone via Cocoa-dev
Platform? > On Jun 15, 2020, at 9:51 AM, Mark Allan via Cocoa-dev > wrote: > > Hi folks, > > I have an app which communicates with a privileged helper tool, and I used > the AuthorizationRightSet API to add the rights, requirements, and prompt > strings to the authorizationdb - as per

Re: Launching in fullscreen gives "Funk" sound sometimes

2020-06-24 Thread Alex Zavatone via Cocoa-dev
Symbolic breakpoints, my man! > On Jun 24, 2020, at 11:57 AM, Gabriel Zachmann via Cocoa-dev > wrote: > >> >> Set a symbolic breakpoint on NSBeep and see whether it’s your code that’s >> calling it. >> > > Thanks, but how would I do that? > I never use NSBeep in my code .. > > Best

Re: Launching another app from mine

2020-06-16 Thread Alex Zavatone via Cocoa-dev
While I agree with the URL scheme launching approach, I’ve seem to remember using NSTask to run a shell script. It would be interesting to see how that works. In Xcode prebuild scripts, I launch a shell script that gets the app PID and launches other apps or scripts based on the app PID

Re: Points vs pixels in a bash script

2020-06-09 Thread Alex Zavatone via Cocoa-dev
Don’t you need to find out what the pixels per inch of the display is first? At 72 dpi or ppi, a pixel = a point. Can you get that info first? > On Jun 8, 2020, at 4:43 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > I know this mailing list might not be the perfect fit for my question,

Re: Relieving memory pressure

2020-06-08 Thread Alex Zavatone via Cocoa-dev
> On Jun 7, 2020, at 3:15 PM, Steve Christensen via Cocoa-dev > wrote: > > For slide shows that I’ve seen, they typically display each image for several > seconds at a time. If that’s the case, why can’t you just load the next image > from disk on a background queue while the current image

Re: Images in UI in dark mode

2020-07-24 Thread Alex Zavatone via Cocoa-dev
Have you looked at it in a view debugger? Is this a Mac app, an iOS app or what? Which version of Xcode are you using? > On Jul 24, 2020, at 11:22 AM, David Durkee via Cocoa-dev > wrote: > > I am finally updating my application to support dark mode. I’ve run into a > hitch in a place where

Re: Missing log output

2020-11-09 Thread Alex Zavatone via Cocoa-dev
I did something super simple in iOS a few years ago. It simply logged to a file in the Documents directory and if there were more than n lines, it would trim the log. Then emailing the log was as simple as issuing a mailto: which opened the log up in the user’s emailer with a title. This

Re: Missing log output

2020-11-09 Thread Alex Zavatone via Cocoa-dev
up a predicate on the name of your app and return the text that is a log message from your app. If you want, you can also filter on a timestamp within now to n weeks or months back. Cheers. > On Nov 9, 2020, at 5:09 PM, Alex Zavatone via Cocoa-dev > wrote: > > I did something

Re: Missing log output

2020-11-10 Thread Alex Zavatone via Cocoa-dev
In the approaches that I used, I logged to a specific file so that I can simply get that file and send that one. On iOS, it was simply getting the file from the docs folder and either using a mailto: URL or using the MFMailComposeViewController. I don’t know if you’re on iOS or MacOS. The

Re: Missing log output

2020-11-12 Thread Alex Zavatone via Cocoa-dev
> On Nov 12, 2020, at 12:50 PM, Gabriel Zachmann wrote: > >> >> Gabe, let me share the decisions and solutions I went over in my attempting >> to solve this on iOS. > > Thanks a lot! > > (BTW: I am working on macOS.) > >> >> In my first logging, all that I wanted was to be able to get

Re: Missing log output

2020-11-12 Thread Alex Zavatone via Cocoa-dev
Gabe, let me share the decisions and solutions I went over in my attempting to solve this on iOS. In my first logging, all that I wanted was to be able to get the NSLogs out of a file that ONLY had the logs from my app. I sent you the code for that. In another app, there were 3 sets of

Re: Keyboard woes

2020-11-17 Thread Alex Zavatone via Cocoa-dev
Which version of Xcode and iOS? Is it in a Simulator, on the device or both? > On Nov 17, 2020, at 6:12 PM, Laurent Daudelin via Cocoa-dev > wrote: > > Anybody knows why, all of a sudden, when the keyboard will appear when > editing a UITextField or a UITextView, the entire screen seems to

Re: Keyboard woes

2020-11-17 Thread Alex Zavatone via Cocoa-dev
I know it’s a lot to ask, but what happens if you set up a simple case? Does the same thing happen? I’ve had to do that many times from back in the Macromedia days until now to narrow down what’s causing the problem. When faced with such strangeness as this, try to see if you can set up a

Bug reporting again.

2020-11-22 Thread Alex Zavatone via Cocoa-dev
I’ve found a bug in Swift’s loadView for UIViewController on iOS that I’d like to report. Swift.org tells us to use https://bugreport.apple.com which returns “bugreport.apple.com’s server IP address could not be found.”. Feedback.apple.com seems not related to bug reporting. I’ve created

Re: Bug reporting again.

2020-11-22 Thread Alex Zavatone via Cocoa-dev
> On Nov 22, 2020, at 3:08 PM, Ben Kennedy wrote: > > >> On 22 Nov 2020, at 12:45 pm, Alex Zavatone via Cocoa-dev >> wrote: >> >> I’ve found a bug in Swift’s loadView for UIViewController on iOS that I’d >> like to report. Swift.org tells us t

Re: Scaling a UIImage

2020-11-02 Thread Alex Zavatone via Cocoa-dev
I’lll dig up a utility class that I made for UIImage that has this as well as others. Cheers. > On Nov 2, 2020, at 4:59 PM, Carl Hoefs via Cocoa-dev > wrote: > > How can I correctly scale a UIImage from 3264x2448 down to 640x480 pixels? > > > I have an iOS app that interacts with a macOS

Re: Scaling a UIImage

2020-11-04 Thread Alex Zavatone via Cocoa-dev
Sorry for the delay. I hope these do what you need. Of course you’ll need to add checks to make sure that you’re not dividing by zero or nil. // Alex Zavatone 4/2/16. + (UIImage *)imageWithImage:(UIImage *)image scaledToHeight:(CGFloat)newHeight { CGFloat ratio = newHeight /

Re: Scaling a UIImage

2020-11-04 Thread Alex Zavatone via Cocoa-dev
I’ve got more if you need to desaturate an image, remove all color, tint a bitmap, as opposed to using tint, this actually makes a new tinted bitmap, find imageInbundle, create enabled and disabled images from source images and so on. Sometimes we want to use the actual tint, and other times,

Re: NSScrollView's custom content inset

2020-11-05 Thread Alex Zavatone via Cocoa-dev
Care to post a screenshot of what you expect and what’s happening? Cheers. Alex Zavatone > On Nov 5, 2020, at 1:28 PM, Dragan Milić via Cocoa-dev > wrote: > > Hi all, > > What would be the best approach to set custom insets of the contentView > (NSClipView) of a NSScrollView? I’ll try to

Multiple shadows in iOS on a view.

2021-06-10 Thread Alex Zavatone via Cocoa-dev
Does anyone have any tips for adding multiple shadows to a view or a view’s CGLayer on iOS in either Objectice-C or Swift? I’ve tried creating multiple CGLayers and adding shadows to each, then inserting them in a view, creating multiple views and inserting the view above or below the current

Re: Simplest way to produce "tick" system sound?

2021-06-11 Thread Alex Zavatone via Cocoa-dev
There are some built in sounds that I remember. You might want want to look for them. > On Jun 11, 2021, at 8:08 AM, Mike Abdullah via Cocoa-dev > wrote: > > NSBeep() ? > > Mike. > > Sent from my iPhone > >> On 11 Jun 2021, at 13:59, Gabriel Zachmann via Cocoa-dev >> wrote: >> >>

How do you handle reading a plist if it may be an array or a dictionary?

2021-05-08 Thread Alex Zavatone via Cocoa-dev
I’m reading a configuration plist like so. NSFileManager *fileManager = [NSFileManager defaultManager]; BOOL success = [fileManager fileExistsAtPath:filePath]; if (success) { _configurationDictionary = [[NSMutableDictionary alloc]initWithDictionary:[NSDictionary

Re: How do you handle reading a plist if it may be an array or a dictionary?

2021-05-08 Thread Alex Zavatone via Cocoa-dev
pple.com/documentation/foundation/nspropertylistserialization> > > b > > Sent from my iPhone > >> On May 8, 2021, at 5:12 PM, Alex Zavatone via Cocoa-dev >> wrote: >> >> I’m reading a configuration plist like so. >> >> NSFile

Re: How do you handle reading a plist if it may be an array or a dictionary?

2021-05-09 Thread Alex Zavatone via Cocoa-dev
; ... > } > else if([object isKindOfClass:NSDitctionary.class]) > { > ... > } > ... > Well, hell! There we go. Thanks Gerd! That’s great! Best, Alex Zavatone > > >> On May 8, 2021, at 19:32, Alex Zavatone via Cocoa-dev >> wrote: >>

Re: How do you handle reading a plist if it may be an array or a dictionary?

2021-05-09 Thread Alex Zavatone via Cocoa-dev
> On May 8, 2021, at 7:42 PM, Ben Kennedy wrote: > > >> On 8 May 2021, at 5:32 pm, Alex Zavatone wrote: >> >> Well, what I’m not sure about are how to store the results internally. Do I >> declare both an NSArray and an NSDictionary and check to see which one ended >> up getting the

Re: How do you handle reading a plist if it may be an array or a dictionary?

2021-05-09 Thread Alex Zavatone via Cocoa-dev
> On May 9, 2021, at 2:15 PM, Steve Mykytyn wrote: > > You're creating your own problem here. If you are controlling what the > configuration plist is, make it a dictionary at the top level with three keys > and entries: Yup. I sure am. Creating it because I want to solve it. It’s a

Re: How do you handle reading a plist if it may be an array or a dictionary?

2021-05-09 Thread Alex Zavatone via Cocoa-dev
This little write up might be a fun read. Hey, it’s Sunday. Why not? > On May 9, 2021, at 4:27 PM, Sandor Szatmari > wrote: > > Alex, > >> On May 9, 2021, at 15:15, Steve Mykytyn via Cocoa-dev >> wrote: >> >> You're creating your own problem here. > > Agreed, If you have control. I

Does anyone have any experience with positioning items in an iOS UITabBar?

2021-06-04 Thread Alex Zavatone via Cocoa-dev
We’re trying to add extra space to the left and right of a UITabBar, but having no luck at all. Have any of you messed with this? Thanks in advance on any tips. Alex Zavatone ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Several different NSUserDefaults in the same app?

2021-04-03 Thread Alex Zavatone via Cocoa-dev
Why not use your top level NSUserDefaults as a dictionary and use each monitor name as a key for each object in the dictionary? Is that too clunky? https://developer.apple.com/documentation/foundation/nsuserdefaults A default object must be a property list—that is, an instance of (or for

Re: Several different NSUserDefaults in the same app?

2021-04-04 Thread Alex Zavatone via Cocoa-dev
And if you want a nice simple HMAC256 encoding class to make the results securer if you want, I’ll happily toss one your way. > On Apr 4, 2021, at 2:22 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > >> >> It appears you are trying to get NSUserDefaults to do something that Apple >>

Re: WKWebView rejecting keyboard input

2021-04-15 Thread Alex Zavatone via Cocoa-dev
Hi Rob. One thing that I learned back in QA is that when we have a working sample and one non-working one, duplicate both, point your app to use them, & start removing items from the one that doesn’t work until you get back down to either it working or end up with identical items in the working

Re: Scroller and not apple's mouse

2021-04-12 Thread Alex Zavatone via Cocoa-dev
What are you trying to do? Which platform is this for? Which language are you using? Regards, Alex Zavatone > On Apr 12, 2021, at 2:30 AM, IOS NACSPORT via Cocoa-dev > wrote: > > Hi, > > I don't kown is the correct place, In a NSScroller, when I conect the > external mouse, not apple's

Re: Scroller and not apple's mouse

2021-04-13 Thread Alex Zavatone via Cocoa-dev
Please show your code. Otherwise, we have little to go on. Sent from my iPhone > On Apr 13, 2021, at 2:41 AM, Allan Odgaard via Cocoa-dev > wrote: > > Probably two things relevant here. > > One is General in system preferences which look like this: > >

Re: Scroller and not apple's mouse

2021-04-13 Thread Alex Zavatone via Cocoa-dev
And WHICH non-Apple mice are you using? Sent from my iPhone > On Apr 13, 2021, at 8:44 AM, Alex Zavatone wrote: > > Please show your code. Otherwise, we have little to go on. > > Sent from my iPhone > >> On Apr 13, 2021, at 2:41 AM, Allan Odgaard via Cocoa-dev >> wrote: >> >> Probably

Re: iOS, handling communicating to a server with a "Not Trusted" SSL cert.

2021-04-20 Thread Alex Zavatone via Cocoa-dev
s://badssl.com <https://badssl.com/>>) to test out whether you are > correctly handling many of the common failures that you can run into when > evaluating trust. > > >> On Apr 17, 2021, at 1:32 PM, Alex Zavatone via Cocoa-dev >> mailto:cocoa-dev@lists.apple.c

  1   2   >