How do I bring another app's window to front on Mac in C/C++?
I have the app's pid.
I found solutions for AppleScript, but I'm not familiar with AppleScript. (and also not with Objective C)
Thanks!
edit: I cannot use Carbon in this program, because it must be a 64 bit binary.
edit2: I'm also interested in Carbon and Cocoa solutions. I c...
I'm having trouble encoding accented characters in a URL using the python command line. Reducing my problem to the essential, this code:
>>> import urllib
>>> print urllib.urlencode({'foo' : raw_input('> ')})
> áéíóúñ
prints this in a mac command line:
foo=%C3%A1%C3%A9%C3%AD%C3%B3%C3%BA%C3%B1
but the same code prints this in window...
I see many text editors for Mac OS X that support Lua syntax highlighting, but I have yet to see an example of Lua being used in action in the actual Operating System.
How is Lua being used practically?
...
I want to wake system from sleep programmatically, is there any way to do this?
I have read following link:
http://developer.apple.com/mac/library/qa/qa2004/qa1340.html
this only talk about getting notification , but not sure is there any way to wake system from sleep?
I appreciate some thread to the information...
Update:
As per th...
I am creating PDF file using ItextSharp V1.1.4322 in ASP.NET Version 2.0. Everything works fine in IE/FF/Safari browsers in windows as expected. In mac/Safari PDF file opens correctly but printout is wrong, cutting page contents. I want the page to auto scale automatic as in windows.
...
I have a NSView that renders some CoreImage stuff in drawRect: method. Everything works fine while I'm rendering on hw-accelerated context, but if I switch to software mode, I have error messages in console for each render:
<Error>: CGBitmapContextGetBitsPerComponent: invalid context 0x1084740 This isn't a bitmap context. Forcing destin...
I have a website which uses CSS for all of its styling, and in Windows, the line-spacing and font sizes are all consistant accross Firefox, Opera, IE, Safari, Chrome.
I have just tried it under Firefox on the Mac (Snow Leopard) and whilst the fonts generally look a little more bold than on windows, the general sizing looks about the sam...
I've installed the binary distribution of paraview on OSX. When running this I can access the python interpreter from the Tools -> Python Shell. However I cannot figure out which libraries I need to add to PYTHONPATH in order to access VTK and Paraview functionality directly from Python.
Of course I could just compile the source distrib...
Is there an app (preferable a Mac app) that will turn an area of your screen into a virtual web cam, such that it would be available as an input source for other apps that want to access your web cam?
...
I'm porting an archaic C++/Carbon program to Obj-C and Cocoa. The current version uses asynchronous usb reads and GetNextEvent to read the data.
When I try to compile this in Objective C, GetNextEvent isn't found because it's in the Carbon framework.
Searching Apple support yields nothing of use.
EDIT TO ADD:
Ok, so what I'm trying ...
I have an application built atop the Eclipse rich-client platform. It does not yet have any user preferences.
Currently on the Mac, the "Preferences" menu item in the application menu is enabled, but does nothing.
Is there an easy way to hide or disable it?
...
I'm curious, can anyone describe the internal structure of a .xib file used by Interface Builder?
...
I'm creating a DOT graph visualization from a tree-like data structure but am having difficulties setting fixed level depths based upon data type. For example, if I had 4 nodes in a tree and A denotes a specific data type and B represents another it would like Graph_1:
ROOT
...
I'm writing a dylib in C++, but when I try to link it into my application, it gives me an error on execution:
dyld: lazy symbol binding failed: Symbol not found: __ZN8Vector2DC1Ev
Referenced from: /Users/noahz/Desktop/Singularity/Singularity Test App/build/Debug/Singularity Test App
Expected in: /Users/noahz/Desktop/Singularity/Sing...
#include <iostream>
#include <fstream>
#include <cstdlib>
using namespace std;
const int FILENAME_MAX=20;
int main() {
ifstream input;
char name[FILENAME_MAX + 1];
int value;
do {
cout << "Enter the filename (maximum of " << (FILENAME_MAX+1)
<< " characters: ";
cin >> name;
input.ope...
I am working with a Macbook programming python. What I want to know is how I can access certain files using Python's file functions. A google search failed me.
For example, Windows would be something like this:
f = open(r'C:\text\somefile.txt')
How would I access something from a folder saved on the Desktop of a Mac?
...
Amazon has the button that opens an app as follows.
Clicking this button opens a 'Amazon Kindle', for my case, 'Amazon Kindle for Mac'.
How is this possible? I mean, how can I program to do this job? It's definitely not Flash.
I tried to use button to open an App using button provided by HTML, but I couldn't make it because of the s...
I'm having a lot of trouble finding SVN for Mac OS X 10.4.11. Would someone please point me to the binary I can download? Thanks!
...
I'm trying to get my application to display an icon for a custom file extension using the following code:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>My Custom Extension</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<...
Hi,
I'm in the middle of brainstorming a cloud sync solution for a Core Data app that I am currently developing. I'm planning to open source the code for this once its done, for anyone to use with their Core Data apps, so input from the community on how this system should work is much appreciated :-) Here's what I'm thinking:
Server S...