cocoa

Anchors in help-book not working

早过忘川 提交于 2021-02-06 09:11:02
问题 I've double checked everything and hoping someone can find a stupid mistake that I'm not seeing. I'm trying to build a Apple Help section for my application and it correctly goes to the landing page however none of the anchors work. The landing page is called index.html and the other page is called test.html which is located in the pgs directory. In index.html I have: <a href="help:anchor=support bookID=com.company.app_name.help">Link to another page</a> In test.html I have: <a name="support"

“pod init” giving error “-bash: pod: command not found”

南楼画角 提交于 2021-02-06 07:05:05
问题 I am trying to create a Podfile for my Xcode project for Firebase compatibility, but when I try to create it within the same file that my Xcode project is stored in, using my terminal and typing "pod init", it throws the error "-bash: pod: command not found". I am up to date on OSX as far as I'm aware, using Sierra 10.12.1, but I am unfamiliar with the use of Podfiles, so any help here would be great, thanks. 回答1: Looks like you didn't install CocoaPods. To do that you install it through ruby

“pod init” giving error “-bash: pod: command not found”

一笑奈何 提交于 2021-02-06 06:55:47
问题 I am trying to create a Podfile for my Xcode project for Firebase compatibility, but when I try to create it within the same file that my Xcode project is stored in, using my terminal and typing "pod init", it throws the error "-bash: pod: command not found". I am up to date on OSX as far as I'm aware, using Sierra 10.12.1, but I am unfamiliar with the use of Podfiles, so any help here would be great, thanks. 回答1: Looks like you didn't install CocoaPods. To do that you install it through ruby

How to set color of NSPopupButton Menu Item

旧街凉风 提交于 2021-02-05 23:00:37
问题 This is an answer, rather than a question. Searching online, I only found a really hacked, contorted answer to this question (http://www.cocoabuilder.com/archive/cocoa/58379-changing-the-text-color-of-an-nsmenuitem-in-an-nspopupbutton.html), which can be answered more elegantly like so: NSArray *itemArray = [scalePopup itemArray]; int i; NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys: [NSColor redColor], NSForegroundColorAttributeName, [NSFont systemFontOfSize: [NSFont

How to set color of NSPopupButton Menu Item

≯℡__Kan透↙ 提交于 2021-02-05 22:50:16
问题 This is an answer, rather than a question. Searching online, I only found a really hacked, contorted answer to this question (http://www.cocoabuilder.com/archive/cocoa/58379-changing-the-text-color-of-an-nsmenuitem-in-an-nspopupbutton.html), which can be answered more elegantly like so: NSArray *itemArray = [scalePopup itemArray]; int i; NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys: [NSColor redColor], NSForegroundColorAttributeName, [NSFont systemFontOfSize: [NSFont

How to set color of NSPopupButton Menu Item

穿精又带淫゛_ 提交于 2021-02-05 22:48:00
问题 This is an answer, rather than a question. Searching online, I only found a really hacked, contorted answer to this question (http://www.cocoabuilder.com/archive/cocoa/58379-changing-the-text-color-of-an-nsmenuitem-in-an-nspopupbutton.html), which can be answered more elegantly like so: NSArray *itemArray = [scalePopup itemArray]; int i; NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys: [NSColor redColor], NSForegroundColorAttributeName, [NSFont systemFontOfSize: [NSFont

Change document in open window in macOS app

穿精又带淫゛_ 提交于 2021-02-05 12:29:51
问题 I am writing a document-based application for macOS. I am trying to write a feature that changes the active document in the current window (in order to be able to cycle through the next/previous documents in a folder, the way one can do with image-browser apps). What command should I be calling to open a different document in the current window? The documentation suggests that openDocument might do this, but when I run documentController.openDocument(nextFile!) then I just get an NSOpenPanel

Change document in open window in macOS app

吃可爱长大的小学妹 提交于 2021-02-05 12:26:23
问题 I am writing a document-based application for macOS. I am trying to write a feature that changes the active document in the current window (in order to be able to cycle through the next/previous documents in a folder, the way one can do with image-browser apps). What command should I be calling to open a different document in the current window? The documentation suggests that openDocument might do this, but when I run documentController.openDocument(nextFile!) then I just get an NSOpenPanel

NSWindow automatically closes after showWindow

淺唱寂寞╮ 提交于 2021-02-05 09:47:45
问题 I'm trying to open a NSWindow inside a Storyboard. I've instantiated the controller correctly, the window opens but disappears instantly. var sb : NSStoryboard? var vc : NSWindowController? @IBAction func openWindow(sender: AnyObject) { let sb = NSStoryboard(name: "NewStoryBoard", bundle: nil) let vc = sb.instantiateControllerWithIdentifier("windowController") vc.showWindow(nil) } I would understand this behavior if the vars would be inside the func. In this case ARC would kill the window. In

NSOutlineView row not editable by “Return” key anymore after reloading a different table view cell

萝らか妹 提交于 2021-02-05 08:11:42
问题 I'm running into the strangest issue with my NSOutlineView : Everything is set up in a storyboard, i.e. the outline view and two NSTableCellView s The two cell views are mostly the same, only one shows an icon, the other one doesn't I can begin editing an item (row) by pressing the Return key, i.e. the NSTextField that is part of my NSTableCellView enters into edit mode. This is the default behavior and works fine so far. However: After editing ends and the item was changed, I use the second