macos - Run the interactive F# in 32 bit mode on Mac

When I'm inside fsharpi on Mac Os and I do open System.Windows.Forms;;let f = new Form();;I get the following warning WARNING: The Carbon driver has not been ported to 64bits, and very few parts of Windows.Forms will work properly, or at all Fontconfig warning: ignoring UTF-8: not a valid region tag Fontconfig warning: ignoring UTF-8: not a valid region tag Fontconfig warning: ignoring UTF-8: not a valid region tag Fontconfig warning: ignoring UTF-8: not a valid region tag val f : Form = System.Windows.Forms.FormAnd in fact noth...Read more

macos - Using SDL2 and xcode 4.6. I manage to create a OpenGL 3.2 core context. BUT can not use glsl 1.50

I am using an example from internet that the author says it works, and it looks legit to me.So, I downloaded SDL2 and built the framework in debug. I create a regular Opengl 2.1 app to check that SDL was built properly and I could debug it.Then I create a OpenGL 3.2 core context I checked that the major version was 3 and the minor 2 (calling to GlGetIntegerv ). I also used this line:SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);and I double check that fixed-pipeline calls are useless now. So far, so good.The prob...Read more

macos - Qt resize frameless widget on MacOSX

I need to create a frameless widget in Qt, and it needs to be resizable. The app will run under Windows and Mac OSX.If I use: setWindowFlags(Qt::FramelessWindowHint);I can resize the window from the bottom-right corner (a QSizeGrip appears, I guess it's included in QMainWindow widget).I can add grips at each corner, but I want the window to be resizable from the sides (and not only the corners). Is there any easy way to make it resizable from all sides like a normal window?There is a workaround for Windows, which consists on override nativeEven...Read more

macos - OpenGL object glossy/shiny in Mac OS X 10.6, but not 10.5. Why?

I've written an OpenGL screensaver for Mac OS X 10.5 and higher which shows a spinning heart constructed using marching cubes. It works fine on my black 13.3" development Macbook running Snow Leopard (10.6), nice and glossy.But when I try it on a newer Macbook Pro but running leopard (10.5), the heart isn't glossy. It appears as though it's only lit with ambient/diffuse light, but no specular light. It's as if I had set the specular component of the light to 0. The newer Macbook has an Nvidia graphics card. The one older one running 10.6 has an...Read more

macos - Lossy Keypress events: how would I reliably check the current hardware state of a key on mac?

I'm working on a game for mac, windows, and linux. It's currently in pretty early stages and libraries are flexible, though it's currently using glfw 3. Almost all games I've played on mac have issues with keys sticking; presumably this is because edge-triggered events are frequently dropped by the OSX apis.My primary question: is there a way to get the current pressed state of a key, independent of any events, such that we can work around this problem?A secondary question is what is dropping these events, and why it doesn't happen with text in...Read more

macos - wglGetCurrentContext for OSX

I have a program on windows that manages OpenGL contexts, (things such as making them current, destroying them, pretty much everything but the actual creation). I've recently moved to programming on a mac, and I was wondering if there is some function similar to wglGetCurrentContext for OSX. I can't seem to find the documentation for these online.Edit: The AGL (Apple GL) framework and more specifically the function aglGetCurrentContext are all deprecated....Read more

macos - Correct way to initialize / sync OpenGL for NSView

I created a custom OpenGLView instead of using NSOpenGLView by following Apple's docs. Drawing seems fine except it seems I have thread sync issues here. Since NSView should be in main thread then how to sync threads, I mean CADisplayLink seems work on different thread so after rotating or zooming to 3D scene some nodes keep their old transform (transformed slowly) until rotation/zooming finished. But if I use dispatch_sync/dispatch_async in display link drawing seems correct. But I'm not sure how it can hurt performance. Q1: Is it right to use...Read more

macos - Detect moving the windows from one display to another

I have a window with an opengl view where content ist rendered. The problem I have in macOS is, that when I move the window from one monitor to the other, its content gets messed up. A redraw fixes the issue. Thus I need to redraw the GL Area when it gets moved from one monitor to the other. Is there any way to detect the transition of the window from one monitor to the other?...Read more

macos - Import .accdb file into Stata (Mac)

I'm looking to import a Microsoft Access file (.accdb) into Stata to read and analyze the data. The trouble is I'm operating on a Mac, which doesn't support Microsoft Access.I've tried transferring the Microsoft Access data into Excel, then saving as a .csv. This allowed me to open the data in Stata, however, it's imperative that I alter the data from its original source as little as possible.Ideally, I'd like to import the .accdb file directly into Stata. To do this I believe I'll need to run an odbc driver/command, but haven't had any luck...Read more

cocoa - macOS: Add CalDAV account (Settings/Internet Accounts/CalDAV account) programmatically

Does anybody know how to programmatically (headless in Objective-C/C++, NOT by using NSAccessibility, AppleScript or any other technology accessing the UI) add a CalDAV account to the macOS system?Manually this ca be done in System Preferences > Internet Accounts > Add an account > Add Other Account... > CalDAV account.So far I have only found the Accounts framework, but there are no constants or any other hints how to add/create a CalDAV account.Regards,Dominik...Read more

macos - CFPreferences any-host and any-application domain behavior

When using CFPreferences to set preferences on osx, there are different Preference Domains.By reading the apple development guide, I understand that for current-user, current-application, current-host preference, it will be stored in ~/Library/Preferences/< application bundle name >.plist. And for any-user, current-application, current-host preference, it will be stored in /Library/Preferences/< application bundle name >.plist.But where to store preferences for other domain combinations? For example current-user, current-application, any...Read more

Docker Percona exits with error 3 in macOS

Using Docker Toolbox in macOS 10.11. Trying to start Percona 5.7 container via docker-compose: percona: image: percona:5.7 user: "1000:50" restart: "no" volumes: - ./db:/var/lib/mysql:rw ports: - 3306:3306 environment: MYSQL_ROOT_PASSWORD: qwertyBut when run:docker-compose upit shows me this log:percona_1 | Initializing databasepercona_1 | 2018-02-27T18:21:40.471171Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be mer...Read more

macos - NSWindow launching with wrong size after setting contentViewController to NSTabViewController

I have an Xcode project with an NSWindowController whose contentViewController was set to a subclass of NSViewController. I recently removed the NSViewController subclass from the storyboard and replaced the contentViewController with an NSTabViewController subclass.Now, when I run the application, the NSWindow opens with a size of 500x500 instead of the size of the first tab. What's more, there is no view I can see in the storyboard that has a size of 500x500, and that size isn't being programmatically, either. The window itself is set to a di...Read more

macos - NSWindow controlling multiple tabs

What is the best way to achieve multiple tab control within a single NSWindow akin to the Terminal App?The existing TabView & TabViewController don't seem to be able to achieve this but I'm not sure.My first thought was to use a collection view but I'm afraid to start re-inventing something already done....Read more