I'm using Ruby to check the position of videos I'm playing in Quicktime via Scripting Bridge.
At the moment I'm just checking the position like so every n seconds:
require 'osx/cocoa'
include OSX
OSX.require_framework 'ScriptingBridge'
app = SBApplication.applicationWithBundleIdentifier_("com.apple.QuickTimePlayerX")
while true
ap...
I need the user select an existing or a new directory where my app can save a few files.
Can i do this with NSSavePanel or is there another directory selector class?
...
I have an NSMenu which contains both static and dynamically created NSMenuItem's (static meaning NSMenuItem's created in Interface Builder, dynamic meaning NSMenuItem's created at run-time). Although I'm developing on 10.6, my application also offers 10.5 support.
My menu consists of a number of dynamic NSMenuItem's which contain subme...
I have a PDFDocument (made up of PDFPages ofcourse) and I need a CGImageRef to stick into my IKImageView.
Currently, I get the datarepresentation from the PDFPage, put it into an NSImage, then get the TIFFRepresentation of the NSImage, put it into a CGImageSource, and then get the CGImage out of the source.
That seemsneedlessly complic...
I'm trying to find a way when a user logs in the system to automatically log off and perform a background script.
Specifically I will need to remove the local user account but keep the home folder in place. This will only need to be done once but I'm not sure of the best approach. The purpose of logging in once is to capture the accoun...
I'm trying to use git instaweb with Ruby' webrick (which I have installed) on Mac OS X, but every time I fire up
$ git instaweb --httpd=webrick
I get the following error:
webrick not found. Install webrick or use --httpd to specify another httpd daemon.
Like I said, I do have webrick, so I don't know why git instaweb won't use i...
I have a window which happily tabs between its controls using the tab and and shift-tab keys. However, I also want to be able to move between controls with the up and down arrow keys (in this case). How can this be achieved?
...
I'm working with an older version of OpenSSL, and I'm running into some behavior that has stumped me for days when trying to work with cross-platform code.
I have code that calls OpenSSL to sign something. My code is modeled after the code in ASN1_sign, which is found in a_sign.c in OpenSSL, which exhibits the same issues when I use it....
Hi,
I want to write a copy and paste function, however I'd like to know how to paste something. I don't want to paste from the clipboard, I want to paste a string. Any idea how to do this?
Help is much appreciated
...
I have a command called youtube-dl .. but dont know where it is installed.. i can run it from shell.. how do i find where it is installed ? which youtube-dl doesnt say anything..
...
I need to make a kext which does a very simple function. Whenever a key combination is pressed the kext should kill a process which happens to be "WindowServer"
It has to be a kext due to the nature of the problem. It has to be independent from system's UI so if it hangs up, I can press this combination and restart it.
Can someone pr...
I have a program that uses OpenGL combined with Cocoa and Python using PyObjC.
I've recently expanded on my menu making code to show menu selections for maps including map information. When using the new code, the window server will spontaneously crash at some random point (Not random but it appears that way). The new code uses nothing ...
I am creating a bash script to backup my files with rsync.
Backups all come from a single directory.
I only want new or modified files to be backed up.
Currently, I am telling rsync to backup the dir, and to check the files compared to the last backup.
The way I am doing this is
THE_TIME=`date "+%Y-%m-%dT%H:%M:%S"`
rsync -aP --link...
Here is my situation. I am testing out Varnish on my local box (I'm doing some stuff related to page caching that would be a big pain to push to staging every time). Everything works fine, except whenever I submit a form, I get an ActionController::InvalidAuthenticityToken exception.
Varnish is running on localhost at port 6081, and Thi...
I know XNU K32 is running in 32-bit. But which 32-bit mode is it in, protect-mode or IA32e-compatibility-mode? In the protect-mode, the MMU takes 32-bit cr3 and using two-level page directories. In the compatibilty-mode, MMU takes 64-bit cr3 and using four-level page directories. I know the kernel has its own cr3 setting separated from a...
Py2app will create the app for python2. But for python3?
Has anyone succeeded in creating an app for python3 script?
Any clue would be helpful for my script in creating that.
...
I'm new to Ruby on Rails.
I ran the following in a terminal when I was going through creating a blog tutorial with Rails:
$ rails blog
[BUG] cross-thread violation on rb_gc()
(null)
Abort trap
How do I determine what this error message means and how to fix it?
$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY V...
Okay, this one seems to me a bit weird. Any help would be greatly appreciated.
I recently implemented code that I found here to get the MAC address. The funny thing is that is prints to the console (in addition to the MAC address) something like the following:
<CFData 0x317df0 [0xa03e9ee0]>{length = 6, capacity = 6, bytes = 0x001f5bd...
I am experimenting with WineBottler and I would like to try to run my win32 native application written in Delphi on OSX.
The application runs, but I stop at login screen since I cannot connect to SQL Server.
Does anyonw know how to install and configure SQL Server native client on OSX so that it is usable with WineBottler?
Note: I put...
Hello there,
I have a problem with a C++ application I've developed which uses dlopen to load user-developed libraries. The application has been used by a variety of people on a variety of linux distros and versions of OSX over the last couple of years and so I'm assuming my usage of dlopen is OK and so is the code that depends on it (y...