Append a folder name to a path variable in applescript?
set fold to "/Users/Test/Desktop/" set file to "/Myfolder/Hi.txt" how to join these two variables to get my file path as "/Users/Test/Desktop//Myfolder/Hi.txt"? ...
set fold to "/Users/Test/Desktop/" set file to "/Myfolder/Hi.txt" how to join these two variables to get my file path as "/Users/Test/Desktop//Myfolder/Hi.txt"? ...
Hey internets! So here's the deal: I have an image in the Resources folder of custom framework that I use as a default for classes in the framework. However, when I create these classes in projects that link against my framework they fail saying they can't find the image. I'm guessing the NSBundle's +mainBundle does not search the cor...
Hello, I have a coding style question which probably should be asked of a senior mac programmer at work - but since I'm the only mac programmer, well, SO it is. I have a pop-up GUI for my software (3D models, data visualization) and the pop-up is Mainly a Tabbed control with a ton of stuff in each tab (sliders, radio buttons, checkboxe...
I have the list of the applications for given file extension (using LSCopyApplicationURLsForURL). I want to change the default file association from code upon selecting one of the applications from the above call. Is there a way to do this? Thanks! ...
I need to delete the same line in a large number of text files. I have been trying to use sed, but I cannot get it to delete the newline character at the end. The following successfully deletes the line, but not the newline: sed -i -e 's/VERSION:1//' *.txt I have tried using the following to delete the newline also, but it does not wo...
NSMenuItem -setTarget: Does it retain the target, or should one explicitly retain it? I've seen conflicting docs on this. I know of retainArguments in NSInvocation, but I'm not sure this applies to NSMenuItem as it doesn't inherit from NSInvocation. ...
I am working on an NSOutlineView that I populate by bindings to an NSTreeController. The NSTreeController contains objects of my own type. Everything is working as expected (getting the correct number of rows and disclosure indicators in the right places) expect that the titles for each row are coming up blank. I have overridden -(NSSt...
I downloaded the Python 2.6.5 source, built it for OS 10.6.4 64-bit, and installed numerous dependencies. I opened a big project our team has been working on recently, ran the unit tests, and one of the tests failed because I had installed Python built using UCS-2 (I didn't know this was the default of OS X!) In a nutshell: I didn't sup...
What are some good code snippet managers for OS X? ...
This may be a very silly question, but I'm new to developing on Macs and am having a hard time with the universal binaries. I've got an application that I'm compiling in QT Creator, which according to lipo is producing i386 architecture outputs. As I understand it, that means it is producing Mac OS X 32 bit outputs. The application dep...
All symbols where exported in previous version of xcode but now we have upgraded to OS X 10.6.4 and xcode 3.2.3. So, in debug xcode property Fix & Continue is enabled which causes all symbols to export but in release its disabled and now while linking to this dylib we get undefined symbol error. I tried to add exported symbol file but do...
I've got a vanilla install of XAMPP in OS X. How can I access the mysql command line tool? I've tried typing "mysql" at the command line, and it spits back "-bash: mysql: command not found". ...
I have an NSArrayController linked to a Core Data object, set to Auto Rearrange Content and filtered by a predicate. All is well until I try to nullify a relationship and assign another. At that point, my application crashes and I receive the following error: Cannot remove an observer for the key path "career.type" from Object...
Hi everyone, I'm using kqueue for socket synchronization in OS X. I can register an event of interest like the following: struct kevent change; EV_SET(&change, connected_socket, EVFILT_READ, EV_ADD, 0, NULL, NULL); kevent(k_queue_, &change, 1, NULL, 0, NULL); And the question is, is there a way to trigger this event by force so that ...
XChangeProperty() with atom named _NET_WM_WINDOW_OPACITY returns BadRequest error code... ...
I have an application in java swing which runs in the system tray most of the time. The user can use the Tray Menu to perform several actions. One of those actions is to show the app window. The problem I have is with usability on OS X. In windows, if the user brings up the app window and later switches to another app, they can switch b...
How do I programmatically set an application bundle on Mac OS X to run when the user logs in? Basically, the equivalent of the HKCU\Software\Microsoft\Windows\CurrentVersion\Run registry key in Windows. ...
Hello, I would like to be notified when the mouse cursor enters in a particular region of the screen and stays there a certain time. I know there is NSMouseEntered & cie for view you are owning, but is there something more generic which works in all the screen? Thanks and regards, ...
I'm having difficulties building the pangocairo bindings on my OSX 10.6 machine and would like to know how to proceed. To sketch the background, I'm writing a wxwindows application in Python with wxpython that draws on a cairo canvas. I have been able to compile all dependencies for this with the extra difficulty that I need 32bit (inst...
We have defined a couple of NSServices for the same NSSendFileTypes in our application's Info.plist. Unfortunately, they occur in a different order than defined when they show up in the context menu. Is it possible to tell OS X to keep the order as defined? ...