mac

Data Store for a Mac/iPhone Hybrid App

I've been doing iPhone development for the last 5 months or so, and have been using Gus Mueller's FMDB for database interaction. My next project will have both a Mac and an iPhone application, and they will share data between them, although in the end, the iPhone will be mostly a viewer app, with some minor editing capabilities. My que...

How can I tell if a file or folder is busy, e.g. the Finder is busy copying to it?

I have tried: Checking the FSCatalogInfo nodeFlags to see if kFSNodeForkOpenBit is set (using kFSNodeForkOpenMask). Checking whether the creator code is between kFirstMagicBusyFiletype and kLastMagicBusyFiletype. Checking the ExtendedFileInfo extendedFinderFlags to see if kExtendedFlagObjectIsBusy is set. Running GetFileInfo -ab from ...

Getting a CGImage out of a PDF file

I have a PDF file where every page is a (LZW) TIFF file. I know this because I created it. I want to be able to load it and save it as a bunch of TIFF files. I can open the PDF file with CGPDFDocumentCreateWithURL, and get a page. I can even draw the page onto the screen. What I WANT to do is draw the page into a bitmapContext, so that...

Why does my c program not free memory as it should?

I have made a program in c and wanted to see, how much memory it uses and noticed, that the memory usage grows while normally using it (at launch time it uses about 250k and now it's at 1.5mb). afaik, I freed all the unused memory and after some time hours, the app uses less memory. Could it be possible, that the freed memory just goes f...

Creating a dual Mac/Win Autorun CD

How do I create a CD that opens a "Drag this icon to the Application folder to install" on the Mac and autoruns an installer on Windows? ...

How can I have a terminal where error messages are coloured, similarly as here?

I would like to see errors in my terminal colorfully, similarly as here: http://stackoverflow.com/questions/452532/what-does-this-python-message-mean ...

How can I set fish shell as my default shell on Mac?

I do not like to write fish again and again when I start terminal. I want fish on by default. ...

What advantage does a Mac (computer) give to a Rails developer?

I'm trying to understand why so much Rails development happens on Macs? Or is this just a myth? Is there any hard evidence to back this up? ...

Why is XSPF Player not working on a Mac?

I'm using the XSPF Player (slim) on a new website. The client tells me they cannot hear any music on their Mac in Safari. The player is visible but it just says "Loading playlist..." and never continues past that point. I cannot imagine why since it works fine in all the PC-based browsers I have tried. I don't have a Mac so am having a h...

How to import file into sqlite?

On a Mac, I have a txt file with two columns, one being an autoincrement in an sqlite table: , "mytext1" , "mytext2" , "mytext3" When I try to import this file, I get a datatype mismatch error: .separator "," .import mytextfile.txt mytable How should the txt file be structured so that it uses the autoincrement? Also, how do I ente...

NSMutableArray memory management

NSMutableArray *a1 = [[NSMutableArray alloc] init]; NSMutableArray *a2 = [NSMutableArray array]; TempObj *obj = [[TempObj alloc] init]; //assume this line is repeated for each obj [a1 addObject:obj]; [a1 addObject:obj2]; [a1 addObject:obj3]; [a1 addObject:obj4]; [obj release]; [obj2 release]; [obj3 release]; [obj4 release]; [a1 releas...

Java Micro Edition (JME) SDK for Mac OS X or Linux

The question is clear from the title. Is there an SDK for the Java Micro Edition available for Mac OS X or Linux? Or does one need Windows XP to develop JME applications? ...

Indirect linking trouble on OSX

hi everyone. I have some trouble with indirect linking. Here is a small example that shows what's going wrong: $ make g++ -fPIC -Wall -c -o main.o main.cpp g++ -fPIC -Wall -c -o a.o a.cpp g++ -fPIC -Wall -c -o b.o b.cpp g++ -fPic -Wall -r -dynamiclib b.o -o libb.dylib g++ -fPic -Wall -r -dynamiclib a.o -o liba.dylib -L. -lb LD_LIB...

What is the best Scheme or LISP implementation for OS X?

I am looking for a version of Scheme or even LISP that I can use to recover some lost Lisp development skills. Some web capabilities would be nice but not essential. I've looked at Plt and MIT scheme and, while both look pretty good, the Plt seems to be more feature rich. I've also looked at Lisp implementations but all of the seem q...

Monitor Cocoa apps for execution of external utilities (e.g., ffmpeg) on Mac OS X ?

There are Mac GUI applications which provide a front-end to more geeky commandline tools (often included as a part of the application package). I would like to look at what is happening under the hood of such GUIs. How to "attach" to an application, monitor it for calls to command line utilities and log a filename and command line param...

clear buffer cache on Mac OS X

Is there a way to programatically clear the buffer cache on the Mac, preferrably in C? Basically, I'm looking for the source of 10.5's purge command. EDIT: I now see this is part of the CHUD tools, for which it seems the source isn't directly available. However, I'm still looking for some code to do the same. ...

What are some of the best online resources for learning Objective-C?

I'm a .NET programmer (C#) and want to learn to develop for the Mac. I'm not fluent in C/C++ but know enough to get my hands dirty, so I figure Objective-C shouldn't be too difficult. Does anyone have any good online resources they'd recommend for learning Objective-C? ...

MobileMe SDK/API Documentation

While searching the web, I've found many references to a "MobileMe API" (or .Mac API) for syncing data with MobileMe, but I can't find any authoritative documentation, even on Apple's site. Anybody know where it is or how to get it? ...

There is really something like Objective C++?

I'm reading a post about iPhone programming and I've noticed that the talk about Objective C++, the code shown in the post looks mainly like Objective-C but there also are several snippets in C++. Is it really possible to program Cocoa from C++? ...

Mouseover in NSTableView

I'm having trouble creating a mouseover function with an NSTableView. The idea is that (if the feature is selected in prefs) placing the mouse pointer above a particular row in an NSTabelView will display a small popup window with additional information regarding the entry in that particular row. The effect should not be immediate (as e....