|
Data structures and user interaction conundrum 5 messages
Hi all, I Have an interesting little problem, thought I’d throw it out there and see if it stirs up any discussion…. Graphics app, wherein the user can draw stuff - arbitrary vectors on a canvas. My b
Hi all, I Have an interesting little problem, thought I’d throw it out there and see if it stirs up any discussion…. Graphics app, wherein the user can draw stuff - arbitrary vectors on a canvas. My b
|
By
Graham Cox
·
|
|
Determine System Time Format (12hr vs 24hr)
I have been using the following code to determine if a system is set to 12hr or 24hr time for sometime… NSString *formatStringForHours = [NSDateFormatter dateFormatFromTemplate:@"j" options:0 locale:[
I have been using the following code to determine if a system is set to 12hr or 24hr time for sometime… NSString *formatStringForHours = [NSDateFormatter dateFormatFromTemplate:@"j" options:0 locale:[
|
By
Sandor Szatmari
·
|
|
Abstracting a group of commonly named Selectors 17 messages
I have a certain group of selectors that all follow a strict naming convention, -(Status)parseXYZ -(Status)parseRST All have one line that does the same thing and return a scalar (enum) as a result. E
I have a certain group of selectors that all follow a strict naming convention, -(Status)parseXYZ -(Status)parseRST All have one line that does the same thing and return a scalar (enum) as a result. E
|
By
Sandor Szatmari
·
|
|
UndoManager setActionNames
The action name is part of the “view” layer in model-controller-view architecture. But most of the actual undoable ’stuff’ is in the model. So I usually set the action name at the top level action met
The action name is part of the “view” layer in model-controller-view architecture. But most of the actual undoable ’stuff’ is in the model. So I usually set the action name at the top level action met
|
By
Graham Cox
·
|
|
Redrawing a view during a dragging session [SOLVED]
As usual, the answer was staring me in the face. The old code was synchronous, the new is asynchronous. I was restoring the view after the call to -dragImage… because that used to keep control until t
As usual, the answer was staring me in the face. The old code was synchronous, the new is asynchronous. I was restoring the view after the call to -dragImage… because that used to keep control until t
|
By
Graham Cox
·
|
|
Redrawing a view during a dragging session
Hi all, I’m updating some legacy code that currently uses the ‘classic’ way to drag stuff, namely [NSView dragImage:at:offset:event:pasteboard:source:slideBack:]; This code has been deprecated forever
Hi all, I’m updating some legacy code that currently uses the ‘classic’ way to drag stuff, namely [NSView dragImage:at:offset:event:pasteboard:source:slideBack:]; This code has been deprecated forever
|
By
Graham Cox
·
|
|
Determining CGContext type at runtime 3 messages
I need to determine whether I am drawing into a CGPDFContext or a different context at runtime. In AppKit, I can use [NSGraphicsContext currentContextDrawingToScreen], but this is code that is passed
I need to determine whether I am drawing into a CGPDFContext or a different context at runtime. In AppKit, I can use [NSGraphicsContext currentContextDrawingToScreen], but this is code that is passed
|
By
Graham Cox
·
|
|
iCloudKit - CoreData Integration: What am I doing wrong?
I have a CoreData-based app where I am experimenting with inter-device synchronization using iCloudKit. At the moment, I am running in Development mode and am using an iPad and a MacCatalyst app as th
I have a CoreData-based app where I am experimenting with inter-device synchronization using iCloudKit. At the moment, I am running in Development mode and am using an iPad and a MacCatalyst app as th
|
By
Rick Aurbach
·
|
|
Manually-shown palettes not showing during app restoration 2 messages
I needed to add many attributes to my CoreData model. Filling in these attributes will happen during migration of old docs, which means loading all the files that each asset points to. Since it can ta
I needed to add many attributes to my CoreData model. Filling in these attributes will happen during migration of old docs, which means loading all the files that each asset points to. Since it can ta
|
By
Steve Mills
·
|
|
WkWebView with URLSchemeHandler
macOS 15.4; Xcode Version 11.4 (11E146) I have a window with a WkWebView. This WkWebView should handle a special scheme. The only way to do this that I know of, is: @IBOutlet var wkWebView: WKWebView!
macOS 15.4; Xcode Version 11.4 (11E146) I have a window with a WkWebView. This WkWebView should handle a special scheme. The only way to do this that I know of, is: @IBOutlet var wkWebView: WKWebView!
|
By
Gerriet M. Denkmann
·
|
|
Correcting scrollbar after app state restoration 6 messages
I've noticed that the vertical scrollbar in the scroll view for my collection view is wrong after app restoration. This happens if the full collection (via CoreData) has, say 1000 items in it, then I
I've noticed that the vertical scrollbar in the scroll view for my collection view is wrong after app restoration. This happens if the full collection (via CoreData) has, say 1000 items in it, then I
|
By
Steve Mills
·
|
|
CoreData in Objective-C in Xcode 11 4 messages
I’m going through Chris Eidhof’s Core Data tutorial here https://www.objc.io/issues/4-core-data/full-core-data-application/ and noticed something that ends up creating a build error directly after cre
I’m going through Chris Eidhof’s Core Data tutorial here https://www.objc.io/issues/4-core-data/full-core-data-application/ and noticed something that ends up creating a build error directly after cre
|
By
Alex Zavatone
·
|
|
Action on Pop 3 messages
iOS 13+, Xcode 11.4.1, Storyboard-based application. I am using a navigation stack to manage some data edits. That is, • nav-controller root is a list of items. • tap on item to segue to a detail pane
iOS 13+, Xcode 11.4.1, Storyboard-based application. I am using a navigation stack to manage some data edits. That is, • nav-controller root is a list of items. • tap on item to segue to a detail pane
|
By
Rick Aurbach
·
|
|
[OT] AppleScript List 7 messages
Hi, I see that the old AppleScript list that was hosted by Apple is no more, does anyone know of an alternative? Thanks a lot Dave
Hi, I see that the old AppleScript list that was hosted by Apple is no more, does anyone know of an alternative? Thanks a lot Dave
|
By
Dave
·
|
|
Crash, but only in release version 4 messages
I am getting a crash, but only in the release version. I get a very helpful "Error 1" if I try to debug the release version, and logging doesn't get me anything, as the crash prevents the log entry fr
I am getting a crash, but only in the release version. I get a very helpful "Error 1" if I try to debug the release version, and logging doesn't get me anything, as the crash prevents the log entry fr
|
By
John Brownie
·
|
|
Strange controls behaviour in sheet modal window 4 messages
Hi all, I have a problem with controls in a sheet-modal window. The button control’s target and action are set up to call a method in File’s Owner, which is a NSWindowController subclass that owns the
Hi all, I have a problem with controls in a sheet-modal window. The button control’s target and action are set up to call a method in File’s Owner, which is a NSWindowController subclass that owns the
|
By
Graham Cox
·
|
|
String handling not working — am I going nuts? 6 messages
Can you take a look at this for me? I think I’ve been cooped up at home too long, because whatever is going on, I’m missing it. Context: I’m working on a data import function for a new app. It looks l
Can you take a look at this for me? I think I’ve been cooped up at home too long, because whatever is going on, I’m missing it. Context: I’m working on a data import function for a new app. It looks l
|
By
Rick Aurbach
·
|
|
manual item enabling 2 messages
Kurt, The menu key equivalents are pulled out before -keyDown: is called. You can override that event in -performKeyEquivalent:, a methof of NSResponder (and therefore views, etc). You can probably ca
Kurt, The menu key equivalents are pulled out before -keyDown: is called. You can override that event in -performKeyEquivalent:, a methof of NSResponder (and therefore views, etc). You can probably ca
|
By
Graham Cox
·
|
|
Clicking in SwiftUI View
macOS 15.4 I have a SwiftUI ContentView, which contains a few vertically stacked Views. For one of these I need the following functionality: when the mouse moves inside the view, or when the view is c
macOS 15.4 I have a SwiftUI ContentView, which contains a few vertically stacked Views. For one of these I need the following functionality: when the mouse moves inside the view, or when the view is c
|
By
Gerriet M. Denkmann
·
|
|
Canceling NSSavePanel Hang App 6 messages
Ran into an interesting issue today… Mac app Xcode 9.4.1, 32bit, 10.12 SDK, 10.6 Deployment Target non-sandboxed app I am opening an NSSavePanel to allow a user to save the results of a report that is
Ran into an interesting issue today… Mac app Xcode 9.4.1, 32bit, 10.12 SDK, 10.6 Deployment Target non-sandboxed app I am opening an NSSavePanel to allow a user to save the results of a report that is
|
By
Sandor Szatmari
·
|