Profile Photo
How to position the window of the app from the beginning, when the app launches?   This works well if I put in a button:   @IBActionfunc test(_ sender: NSButton) {… (Show more)
in Cocoa
Profile Photo
How to have a window without the window bar? I mean without the bar, the title and the buttons on the top left.   I know that I can do that in the storyboard but I want to do it programmatically and with Swift   What I have tried:     override func viewWillAppear() {         super.viewWillAppear()           //… (Show more)
in Cocoa
Profile Photo
I'm creating a MacOS document-based app in Swift. When running the app, if I make modifications to the document, and then select "Revert to Saved", I get a dialog asking me if I want to revert the document, losing current changes, but if I click on "Revert", nothing happens. The document keeps its changes.   Furthermore, after clicking Revert,… (Show more)
in Cocoa
Profile Photo
I do not know, and cannot find, the standard technical term for the drag-select functionality when the alt/option button is pressed when hovering over an NSTextView.   When alt is pressed, the crosshair appears and text can be selected/highlighted in columns/vertically, as in Xcode.   I would like to disable this functionality in my NSTextViews,… (Show more)
in Text and Fonts
Profile Photo
I have been trying to get rid of many errors, and this one still persists:     if ([localeClass respondsToSelector:localeSelector]) {     IMP getLocaleIMP = [localeClass methodForSelector:localeSelector];     NSString *(*getLocale)(id, SEL) = (void *)getLocaleIMP;     NSString *fcmLocale = getLocale(localeClass, localeSelector);     if (fcmLocale… (Show more)
in Objective-C
Profile Photo
I'm writing a 3d game. I started out with an X-Code preset "Game" with MetalKit. It generated an AppDelegate, a GameController, a Renderer, some shaders, and a MainStory board. In GameController I've got an MTKView instantiated. I can catch mouse events in GameController with, for example, override func mouseMoved() {} but keyboard events elude… (Show more)
in Cocoa
Profile Photo
I am trying to send a mail from within a sharingextension with the NSSharingService.   There is no error in Console or in any other media i can debug. Did anyone manage to use the NSSharingService* sharingService = [NSSharingService sharingServiceNamed:NSSharingServiceNameComposeEmail];   My code brings up the Mail dialog as soon as I copy it… (Show more)
in Cocoa
Profile Photo
I'd like to detect the difference between close window and close tab so that I can diaplay an alert for command window to make sure the user wants to closee the wndow containing all of the tabs. This is a document based app.   I need to do this from the menu as well as from the window and tab close buttons.   I have tried using performClose but… (Show more)
in Cocoa
Profile Photo
I'm planning to create a macOS applicaiton for doing textual analysis. For example, it would open a text file and then create a statistical display of word distributions, character frequencies, and so on. The app would not allow editing of any of the files it opens, but it might save versions of those files that have changes to the original (e.g.… (Show more)
in Cocoa