|
WindowController
Which probably does a close which is not what you want. Assuming that your window controller is your window delegate (I think that is set up automagically) you want to add a method to your controller.
Which probably does a close which is not what you want. Assuming that your window controller is your window delegate (I think that is set up automagically) you want to add a method to your controller.
|
By
Marco S Hyman
· #89
·
|
|
"broken pipe", but not when debugging...
Before running your app open the Console app and put the process name of your app in the search bar. The run your app. I believe you'll see your output. It seems with the new log system is you have to
Before running your app open the Console app and put the process name of your app in the search bar. The run your app. I believe you'll see your output. It seems with the new log system is you have to
|
By
Marco S Hyman
· #165
·
|
|
Sandboxed WkWebView
I don’t know if this has anything to do with your issue. One difference between a sandboxed and non-sandboxed app is that the “home directory” in a sandboxed app is inside the application container, n
I don’t know if this has anything to do with your issue. One difference between a sandboxed and non-sandboxed app is that the “home directory” in a sandboxed app is inside the application container, n
|
By
Marco S Hyman
· #349
·
|
|
Sandboxed WkWebView
I believe URL access requires com.apple.security.files.bookmarks.app-scope entitlement in a sandboxed app. Marc
I believe URL access requires com.apple.security.files.bookmarks.app-scope entitlement in a sandboxed app. Marc
|
By
Marco S Hyman
· #353
·
|
|
Swift and KVC
This simple little playground doesn’t print any value for the last line. It is a minimization of an issue I’m having in a larger program where the key-value can not be found. Is it me (likely) or is i
This simple little playground doesn’t print any value for the last line. It is a minimization of an issue I’m having in a larger program where the key-value can not be found. Is it me (likely) or is i
|
By
Marco S Hyman
· #553
·
|
|
Swift and KVC
Many, many thanks. One curiosity, though... that works in my application but I still get no output in the Playground sample code. Marc
Many, many thanks. One curiosity, though... that works in my application but I still get no output in the Playground sample code. Marc
|
By
Marco S Hyman
· #555
·
|
|
Swift and KVC
Perhaps I’m expecting too much from Xcode. I’d quit and relaunched in order to get output for the code I’d posted. I didn’t expect I’d have to quit and relaunch again because I changed one line. Shoul
Perhaps I’m expecting too much from Xcode. I’d quit and relaunched in order to get output for the code I’d posted. I didn’t expect I’d have to quit and relaunch again because I changed one line. Shoul
|
By
Marco S Hyman
· #557
·
|
|
NSAlert runModal black window
Has NSAlert changed recently? Looking at the documentation I see that the only initializer (swift) is `init(error: Error)` yet my code never passes an error. Is the Error argument new? But my issue is
Has NSAlert changed recently? Looking at the documentation I see that the only initializer (swift) is `init(error: Error)` yet my code never passes an error. Is the Error argument new? But my issue is
|
By
Marco S Hyman
· #845
·
|
|
NSAlert runModal black window
Good thought, but I don’t think that is the problem this time. The alert is created in a function diretly called called from func tableView(_ tableView: NSTableView, acceptDrop info: NSDraggingInfo, r
Good thought, but I don’t think that is the problem this time. The alert is created in a function diretly called called from func tableView(_ tableView: NSTableView, acceptDrop info: NSDraggingInfo, r
|
By
Marco S Hyman
· #847
·
|
|
macOS Drag and Drop onto App Icon
I thought this was answered earlier. Implement this in your app delegate // MARK: Open File (UTI support) /// process files give to us via "Open With..." /// /// - parameter sender: unused /// - param
I thought this was answered earlier. Implement this in your app delegate // MARK: Open File (UTI support) /// process files give to us via "Open With..." /// /// - parameter sender: unused /// - param
|
By
Marco S Hyman
· #915
·
|
|
How to Display a Time Interval
Can not be done accurately using only a Time Interval in seconds. You also need either the start or end date to figure out leap year complications. Don’t know of any. I’d probably roll my own. Marc
Can not be done accurately using only a Time Interval in seconds. You also need either the start or end date to figure out leap year complications. Don’t know of any. I’d probably roll my own. Marc
|
By
Marco S Hyman
· #944
·
|
|
How to Display a Time Interval
Ooops, I’m wrong... Leap year complications should be part of the time interval and be ignored. My programming history got the better of my knowledge... the first ever COBOL program I wrote figured ou
Ooops, I’m wrong... Leap year complications should be part of the time interval and be ignored. My programming history got the better of my knowledge... the first ever COBOL program I wrote figured ou
|
By
Marco S Hyman
· #946
·
|
|
String handling not working — am I going nuts?
Are the lines terminated with a carriage return/line feed pair or are they terminated with the character string " ”. The results of step 2 and 3 are what I’d expect if the string contained the charact
Are the lines terminated with a carriage return/line feed pair or are they terminated with the character string " ”. The results of step 2 and 3 are what I’d expect if the string contained the charact
|
By
Marco S Hyman
· #1216
·
|
|
String handling not working — am I going nuts?
Oh. Yeah. That’s too much work. var str = try String(contentsOf: urlContext.url) // (1) let lines = str.split(separator: “ ”) // (3) works and is faster in that you’ve removed an O(n) operation, I cre
Oh. Yeah. That’s too much work. var str = try String(contentsOf: urlContext.url) // (1) let lines = str.split(separator: “ ”) // (3) works and is faster in that you’ve removed an O(n) operation, I cre
|
By
Marco S Hyman
· #1218
·
|
|
Loading tiff files
NSImage can do the job.
By
Marco S Hyman
· #1337
·
|
|
Loading tiff files
NSImage opens lots of image file types: jpg, tiff, many raw formats, etc. Instead of thinking “tif” think “image file”.
NSImage opens lots of image file types: jpg, tiff, many raw formats, etc. Instead of thinking “tif” think “image file”.
|
By
Marco S Hyman
· #1339
·
|