macos-high-sierra

macOS Key Event Slow Repeat

社会主义新天地 提交于 2019-12-02 18:37:45
问题 I'm trying to create a small WASD demo game in macOS. I'm using NSEvent for handling the key events. To detect the key presses, I'm searching for keyDown events. Here's what I have: NSEvent.addLocalMonitorForEvents(matching: .keyDown) { (keyEvent) -> NSEvent? in if self.keyDown(with: keyEvent) { return nil } else { return keyEvent } } func keyDown(with event: NSEvent) -> Bool { userInt.keyDown(key: event.characters) return true } So here, I'm holding the keys down (as you'd expect in a game),

MySQL Compatibility with MacOS Sierra

最后都变了- 提交于 2019-12-02 17:39:58
Does anybody know of any compatibility issues or quirks with MySQL Community Server/Workbench on macOS Sierra? I recently did an installation on a Mac that had never held MySQL before and it doesn't seem to be working correctly. (Now maybe I just set it up wrong, but the since the installer offers no advanced options that doesn't seem to be the case.) I can create schemas and tables, but when I go to actually query the table nothing happens. The activity indicator spins endlessly. I took a look at Activity Monitor and it doesn't show mysqld actually doing anything—the whole setup just appears

CocoaPods not working in macOS High Sierra

这一生的挚爱 提交于 2019-12-02 14:19:56
After upgrading to macOS High Sierra CocoaPods is not working. While it is tempting to move away from CocoaPods, it's unfortunately not in scope right now. The error message is below. zsh: /Users/****/.gems/bin/pod: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin: no such file or directory I realize that the error stems from Ruby being upgraded but what is the easies fix? Trying to make CocoaPods use the new ruby version yields other errors. Edit: For now i installed Ruby 2.0 with rvm install 2.0.0 and rvm use 2.0.0 and then reinstalled CocoaPods sudo gem

macOS Key Event Slow Repeat

烈酒焚心 提交于 2019-12-02 09:43:31
I'm trying to create a small WASD demo game in macOS. I'm using NSEvent for handling the key events. To detect the key presses, I'm searching for keyDown events. Here's what I have: NSEvent.addLocalMonitorForEvents(matching: .keyDown) { (keyEvent) -> NSEvent? in if self.keyDown(with: keyEvent) { return nil } else { return keyEvent } } func keyDown(with event: NSEvent) -> Bool { userInt.keyDown(key: event.characters) return true } So here, I'm holding the keys down (as you'd expect in a game), and I'm getting some very slow movement. Like, when I'm holding it down, it's very janky. Upon further

“OSError: mysql_config not found” when trying to “pip install mysqlclient” - Django

戏子无情 提交于 2019-12-02 07:21:56
问题 I'm relatively new to Django, and Web Development in general. I am trying to pip install mysqlclient in my virtualenv -p python3 to hook up Django 2.0 to mySQL. However, I'm getting this error: Collecting mysqlclient Using cached mysqlclient-1.3.12.tar.gz Complete output from command python setup.py egg_info: /bin/sh: mysql_config: command not found Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/43/md5vpqrx0mx8627sq04slbz00000gn/T/pip-build

PySide2 not updating QLabel text when asked

孤者浪人 提交于 2019-12-02 01:39:48
问题 I am upgrading from Python 2.7 to Python 3.6 and from PySide to PySide2. I started by trying to get the "Hello World" from the "Getting Started" site (https://doc-snapshots.qt.io/qtforpython/gettingstarted.html) working. It displays the widget, its label and the push button, but the push button does not change the text of the label. I added a print() to verify that the button is indeed calling the method associated with the click signal, and even added an update() to try to "encourage" it a

'Class FIFinderSyncExtensionHost is implemented in both …' warning in Xcode since update to macOS High Sierra

江枫思渺然 提交于 2019-12-01 13:41:23
问题 I am getting the following warning in the Xcode console while running (not compiling) my application since updating to High Sierra on my MacBook: objc[26299]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fff88339a70) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride

iOS 11 - Core Data - UIColor no longers works as transformable attribute

妖精的绣舞 提交于 2019-12-01 03:16:49
I store colours in my binary Core Data store using a transformable attribute, specifying the class of the attribute as UIColor like so: #import "CoreDataEntity+CoreDataClass.h" #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface CoreDataEntity (CoreDataProperties) + (NSFetchRequest<CoreDataEntity *> *)fetchRequest; @property (nullable, nonatomic, retain) UIColor *transformable; @property (nullable, nonatomic, copy) NSString *string; @end NS_ASSUME_NONNULL_END In the iOS 11 Beta this has stopped working with an error like this : NSUnderlyingException=value for key 'NS.objects' was of

iOS 11 - Core Data - UIColor no longers works as transformable attribute

自作多情 提交于 2019-11-30 23:26:04
问题 I store colours in my binary Core Data store using a transformable attribute, specifying the class of the attribute as UIColor like so: #import "CoreDataEntity+CoreDataClass.h" #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface CoreDataEntity (CoreDataProperties) + (NSFetchRequest<CoreDataEntity *> *)fetchRequest; @property (nullable, nonatomic, retain) UIColor *transformable; @property (nullable, nonatomic, copy) NSString *string; @end NS_ASSUME_NONNULL_END In the iOS 11 Beta this

How do I enable C++17 in Xcode for Mac OSX?

别等时光非礼了梦想. 提交于 2019-11-30 18:41:51
How do I enable C++17 in Xcode (9.4.1) on OSX High Sierra (10.13.5)? Steps to use C++17 in Xcode (9.4.1) on OSX High Sierra (10.13.5): Open existing or create a new C++ project in Xcode Click on the "show project navigator" button. It is located on the top-left section of Xcode window just below the minimize/maximize/close window buttons. It is the left-most icon and looks like a folder. Click on "Build Settings" and scroll down to find and expand the section "Apple LLVM 9.0 - Language - C++" Change the C++ Language Dialect combobox selection to "C++17 [-std=c++17]" Verification steps: Now