Hey all, I'm pretty new to Cocoa and XCode, so I'm sorry if this is a dumb question.
How would I go about checking which window is in focus?
Additionally how would I go about checking if a certain window is in focus, if this is not the same as the previous solution.
Thanks for the help.
...
I have a very simple chunk of code that is designed to simulate keyboard events. The simple example below should type "Cz" - the shift key goes down, the c key goes down, c comes up and shift comes up. Then the z key goes down and up.
It seems that sometimes the order gets muddled though. When I create a timer to call this routine ev...
I'm trying to re-invent Preview.app. I've been told that some examples in /Developers/Examples/AppKit will help me. However, on my 10.6 system, I don't have such a folder.
Did the examples get moved? Is my installation somehow incomplete? will the examples I copy from a 10.5 system work?
thanks
...
I am using the dlmalloc library on Mac OS X in a mixed C/C++ environment.
The following simple code
/// strdup-test.cpp
///
#include <iostream>
#include <string>
int main(int argc, char **argv) {
std::string s1("foo");
char *c1=strdup(s1.c_str());
std::cerr << c1 << std::endl;
// segfault?
free(c1);
return 0;
}
wh...
Does a system call or library exist that would allow my C++ code to use hdiutil on Mac OS X. My code needs to mount an available .dmg file and then manipulate what's inside.
...
On Linux if I do file foo, and assuming foo is a binary or shared library, the output will show me if the binary is stripped of symbols. When I try the same on Mac OSX, all I get "Mach-0 executable ppc". Is there another command I can use to check if files are stripped?
...
I have two issues with Allow Relocation (Package: Xxx, Components):
It keeps getting turned on as if by magic. How can I avoid this? I need it off (sub-optimal, I know - see #2)
If Allow Relocation is on, the Installer first places the .app into /Applications, but then relocates it, copying it on top of my original .app in my developme...
While developing an install with PackageMaker (XCode 3.2.1 1613, for Snow Leopard), sometimes the permissions, owner, and group that I have set on most (if not all) of the files just vaporize. The result looks like I just added the files to PackageMaker, before setting the file perm/own/grp on each.
What's weird, is that most of those x...
-(void)test
{
int i;
for (i=0;i < 1000000;i++)
{
//do lengthly operation
}
}
How to prevent its GUI from freezing ?
Thanks in advance.
...
Trying to get Maven, Java, and OS X to play nice together - something I've done multiple times without issue on Linux and Windows machines. I assumed all I needed to do was download Maven, setup my environment variables and I'd be good. So here's a snippet from my .bash_profile...
export JAVA_HOME=/Library/Java/Home/
export M2_HOME=/u...
I'm having a hardtime trying to install pyactivemq (link) on my osx leopard. Following a tutorial (in portuguese) on compiling it ends up ok, but when I run the tests i receive only a crypt message:
"Fatal Python error: Interpreter not initialized (version mismatch?)"
There is not much information on the web about using pyactivemq on ...
Hey,
I'm having the exact issue as described in this question: http://stackoverflow.com/questions/354194/mysql-installation-troubles. Unfortunately none of the answers helped me (and it's closed).
I try to learn Ruby on Rails and don't get MySQL working (so it is programming related).
I typed: rake db:create and got:
!!!The bundled m...
Scenario:
Machine A has a share called 'foo'.
Machine B has a share called 'bar'.
Machine B mounts foo and symlink it in to a sub folder in bar.
Machine C mounts bar.
Users of machine C should now have access to files in foo.
I really would like to do this on OSX with afp, but I've heard that this likely will not work. Is there anot...
I'm using the built in SVN with Mac OS X and I checked out a project via command line. I got all my projects and everything but the .svn folder wasn't created like it was on my PC. And now SVN is just treating my project like a folder and I can't do updates or anything. Any ideas?
.svn is not a valid folder name for Mac
...
I'm using Apache for my website, so that I can see it on other computers on the LAN, and it worked fine until recently, where I suddenly can't access my site from my local IP, even through I have web sharing enabled. I just get a message that it can't connect to the server. I can still visit it through localhost. When I start Apache thro...
Do they write/store them within the app bundle/package itself? Or some other canonical location? Or does there not seem to be any standard?
...
I'm trying to startup my PostgreSQL server on my local machine.
But I got an error message saying:
FATAL: could not create shared memory segment: Invalid argument
DETAIL: Failed system call was shmget(key=5432001, size=9781248, 03600).
HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded you...
Hello all,
One line of background: I'm the developer of Redis, a NoSQL database (http://code.google.com/p/redis). One of the new features I'm implementing is Virtual Memory, because Redis takes all the data in memory. Thanks to VM Redis is able to transfer rarely used objects from memory to disk, there are a number of reasons why this w...
Greetings,
Is there an easy way to access SSH server without installing a client.
Like in linux (Gnome) I can type ssh://192.168.2.38 and access the resource.
thanks
...
Hello All,
I want to create a toolbar and a button over this tool as an add on in Safari and Firefox.
I never created one, so if anyone could suggest me what are actually required to create add on for them, it would be highly appreciated.
I want to develop this add on for browser versions of Mac.
Thanks,
Rahul
...