osx

Problem with scanf() on mac

Hi! I compile a C library on mac os x. When I typed the input and after printing on the screen the data I don't see something. char *path = NULL; peerdisplay = "Bob"; printf("Insert the full 'To' path: "); scanf(" %a[^\n]", printf("A path: %s \n", When I replace the %a to %s, the printing ok, but after the running I have a segment...

Compatibility issues with package developed on OS X10.6.4 on older OS X

I am using Os X 10.6.4 and X code Version 3.2.3 for developing some simple app files and using PackageMaker to distribute these app files. But when trying to run the package on some other mac I am getting error that the package is not compatible with the Os X its running and file would not be installed. Is this a problem with X code or p...

Is there a cocoa framework for image scanning?

What options do I have for an image scanning framework on Mac OS X? I'm not looking for an OCR library. Just something that will do the actual scanning and importing to PDF or comparable format. ...

MS Access .mdb files in Mac OS X (or Mono)

Hi. Whats the best way to write to MS Access (.mdb) databases on Mac OS? I have a project that I'd like to port (quickly) to Mac OS and I'm thinking about using something cross-platform such as Mono. Can anybody recommend a good place to start? Do I really have to scrap my .mdb files and export into something else? I quite like the .m...

Building a Python extension with bjam (Boost.Build) on Mac OS X

So far as I can tell what happens is this: In python.jam, it works out which version of Python I am using and which library directories to look in; It adds -Wl-R arguments to the g++ command line to include those directories; The ld command complains that it does not have a -R option. So either (a) I have a defective version of ld, o...

Determine kernel bitness in Mac OS X 10.6

I know that I can use the terminal and the system-profiler command to determine the current bitness of the kernel but I am trying to determine if there is a way to get that same information programmatically in objective-c. I have looked through Carbon's gestalt, but haven't seen anything that would tell me bitness of the kernel. Does a...

How to test for valid file name in Mac OS X

Anyone know how to test if a string is a valid file name in Mac OS X, other than trying to create file with that name? The issue I'm having is that sometimes, a file name can be too large. OSX has a byte limit for filenames and with unicode characters you can't just check the length of the string since they can be more than 1 byte. ...

How do I create a Cocoa (Obj-C) Dynamic Library for OS X?

So basically I want to create a Dynamic Library in OS X that is built utilizing Cocoa (In Obj-C, not C or C++). My question is - how do I do this? Ultimately I want the library to be loaded by another application (which I know how to do). I just don't know how to create a module utilizing Objective-C. Thanks! ...

CoreAudio: getting device count breaks when linking to Foundation on 10.6

I have a mixed C++/Objective-C project that uses AudioObjectGetPropertyDataSize to get the number of audio devices (such as USB headsets) plugged in. This API doesn't seem to work under certain conditions. For example, on 10.5 it will work but on 10.6 it won't detect when a new USB headset is plugged in. I've pared down the problem to...

What is the Equivalent of Windows WMI for MacOS C++ Development?

I have a C++ application that gets detailed system information (processor type, available disk space, other hardware profile info) on Windows using WMI. I want to perform the same type of operations on OSX 10.5+. What is the equivalent API or interface for MacOS? Links to API documentation or tutorials are very welcome. ...

mac osx and flash

I recently updated my mac osx(security update I think) and since then flash cs4 started to crash. I looked on the web and some people suggested deactivating Franklin Gothic font. I did that. Even uninstall and reinstalled the Flash cs4 itself and still it keeps on crashing. One wired thing that I found is that it doesn't crash when I ope...

Switch between version of Python?

I just installed Python 2.7, but IDLE is currently broken on OS X 10.6.4. Is there anyway I can revert to the earlier, Apple installed, version? A simple PATH adjustment, perhaps? Right now $PATH looks like this for me: /Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin...

Mac - iTunes status indicator thing

I don't know what to call it, but you know that greenish thing covering most of the middle of the top of the iTunes window, that shows the apple symbol or shows the music slider or the status etc., what is it? I've seen several other applications using it -- how do you get it? I couldn't find it in Interface Builder. Thanks. ...

How do I create a memory-mapped file without a backing file on OSX?

I want to use a library that uses file descriptors as the basic means to access its data. For performance reasons, I don't want to have to commit files to the disk each before I use this library's functions. I want to create (large) data blobs on the fly, and call into the library to send them to a server. As it stands, I have to write ...

Good GUI FTP client for MacOSX

I'm relatively new to the MacOS X platform, so I'm still missing my Windows tools, right now the (graphical) FTP client. Google told me there were many of them, not which are good. I'm looking for common tasks support: view folders, download/upload files one by one or by batches, re-orderable down/up queues, pause/resume and some kind of...

Is it possible to know referrer for GURL call received via AppleScript event?

I have a protocol handler associated with my Cocoa application. [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(getUrl:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; ... - (void)getUrl:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDesc...

Bash: piped argument to open command fails. Open commands excutes too early?

I'm pretty much a novice to shell scripting. I'm trying to send the output of some piped commands to an open command in bash in OSX. My ultimate goal is to compile a Flex/Actionscript application from TextWrangler by calling a bash script with a little Applescript and have the result played directly in a Flash Player. The Applescript is...

How does Perl interact with the scripts it is running?

I have a Perl script that runs a different utility (called Radmind, for those interested) that has the capability to edit the filesystem. The Perl script monitors output from this process, so it would be running throughout this whole situation. What would happen if the utility being run by the script tried to edit the script file itself...

Programatic file associations in OS X.

Is it possible to use an Apple Script or a Unix executable to associate a file type with an app? My problem is I'm using File Vault and it forgets previous associations (it's a well known bug so it seems). For instance, I like to use Flying Meat's Acorn for my graphics files rather than Preview. I can Cmd-I, change all, and while it sti...

Steps for how to install QT, PyQT, and PySide on OS X Snow Leopard

I've had some problems installing QT on Snow Leopard and I'm hoping that I can benefit from someone else who's been in this position. :) I'm assuming that I'll need to use a version of python that's not included with SL... be it from homebrew, macports, python.org, etc. Can anyone give me some simple steps to follow to get QT, PyQT, an...