mac

fopen and open produce files with different file permissions

These two code snippets produce files with different file-permissions. Example 1 creates the expected default file-permissions but Example 2 does not. What's the explanation for this? OS: Mac OS X version: 10.6.4 Xcode version: 3.2.2, 64 bit // Example 1 FILE *fh1 = fopen("Test1.txt", "w+x"); if (fh1) { fwrite("TEST1", 1, 5, fh...

Change the default directory of emacs with 'cocoa emacs'

As explained in here, putting (setq default-directory "~/Desktop/mag" ) in .emacs is supposed to change the default directory. When I do that with the emacs on my mac, it doesn't work. C-x C-f still shows ~/ not ~/Desktop/mag. (cd "Users/smcho/Desktop/mag") also gives me this error - Error: No such directory found via CDPATH environm...

Is there any hook to access the names of the functions being called at runtime in Xcode?

Is there any hook to access the names of the functions being called at runtime in Xcode? I'm just trying to log the names of all the functions that are called during the lifetime of the process. I have the necessary symbols for the application. I can do it easily in Visual Studio using _penter() and _pexit() functions. But can't find a...

Custom shortcut "control + /" gives a beep sound on MacBook (osx 10.6)

Hi I am using " control + / " as a keyboard shortcut for my browser extension. On Macbook (OSX 10.6) the shortcut works but always give a beep sound. On mac mini it works without a beep. What i am doing wrong? Is control+ reserved for operating system? should i try with "command + /" or something like that? "control + /" is not docum...

A pointer in the right direction

I have been developing a Mac Desktop app with an iOS device counterpart. Basically I want to upload event information (music gigs etc.) from the Desktop to an online database and be able to read (only) the information whilst mobile. I've got both apps working, using Core Data (with a sqlite database - I was going to use XML but the iOS ...

How do I tell on Mac OS X if I have the Carbon or Cocoa version of Qt installed?

I installed the QtSDK, but I can't find any documentation anywhere that specifies whether it uses the Cocoa or Carbon version. Can I find out which got installed? If not, is it safe to install the Cocoa version from the Library only dmg? Qt version is 4.6.3, system version is 10.6.4. ...

On OS X, what is the proper setting for $QTDIR?

I'm trying to install QtROOT, and as part of the installation (specifically, the readme file in the QtROOT tarball at http://root.bnl.gov/QtRoot/downloads/qtFullRoot.tar.gz), it mentions to make sure that QTDIR is set. I've installed from the Qt 4.6.3 SDK installation for Mac OS X, and I have no such environment variable set. I've trie...

NSMatrix NSButtonCell AttributedTitle Wordwrap

Hello All, I am having an issue that is perplexing me. I have a NSMatrix using NSButtonCells to display a series of checkboxes. Because the Text is RTF I have to set AttributedTitle instead of Title. But even with wordwrap set to true it will only wrap Title and never does it to AttribtuedTitle. Has anyone out there ever dealt with thi...

Problem with dealloc method - 'xmlEntity' is not an Objective-C class name or alias

I am in the process of cleaning my code and testing for bugs, when I came across this build error: ['xmlEntity' is not an Objective-C class name or alias]. Here is a shorten version of my class .h file. @interface PMXMLParser : NSXMLParser { NSMutableDictionary *xmlEntity; NSMutableDictionary *collectionDict; } @p...

Reading and writing to USB (HID) interrupt endpoints on Mac

I am attempting to communicate with a rather specific USB device and developing both Windows and Mac code to do so. The device is a USB device with a HID interface (class 3) with two endpoints, an interrupt input and an interrupt output. The nature of the device is such that data is sent out from the device on the input endpoint only...

Resolve iPhone/iPod/Mac computers connected to a local LAN

Is it possible to easily resolve all Apple OSX devices connected to a single LAN network (the same switch / hub is enough)? I know OSX provides Bonjour service and you can easily query other Macs connected to the network. But I am not sure whether iPhone / iPods provide similar identification. The identification should be device id - in...

Send sms from Cocoa application

I want to make a simple program to send SMS from osX. I know there's already something available on the web, but I want to code it by myself. I need to know if there's any useful API to write this with Cocoa or how to send AT commands to any discovered device. Thank you. ...

What affects the enabled status of the zoom button on a JFrame for Mac?

I have a Java program that I wrote that changes whether or not a JFrame is resizable depending on application state. In Windows this works great, when it is resizable the maximize button is enabled when it's not the button is disabled. However, on my Mac when I change resizable back to true the zoom button does not become enabled but the...

Running XAMPP on Windows through VMWare Fusion on a MAC, how do I configure apache to use my shared folders (Z:) as the web root?

Environment: Main platform: MAC OSX 10.6 Secondary platform via VMWare Fusion: Windows 7 64-bit Background: I'm running MAMP Pro on the MAC side with a webroot at "/www". I need to test websites in IE thus requiring a Windows installation. I installed XAMPP on my Windows side and changed the apache root directory to "Z:\www", the ...

Unable to type braces and square braces in emacs

I'm running Mac OS X and GNU Emacs 22.3.1. I use a swedish keyboard. I am unable to type braces {}, [] in emacs. When trying to type braces I get parenthesis. Since I'm quite new to Mac and emacs I need a little help on configuring emacs to get this right. TIA Niclas ...

What is the Mac equivalent of AVAudioPlayer?

Hi, I am porting an iPhone app to Mac. On iPhone I use AVAudioPlayer for playing sounds, but it doesn't exist on Mac. What would be the Mac equivalent for playing audio (hopefully as simple as AVAudioPlayer so I can port my app easily)? Additionally, are there any open source libraries / samples / wrappers available for playing music ...

how to export data from realbasic to open office word file or comptable software

Hi I use real basic for programming and I want to export some data to a word file that can be opened with "Open Office" or any other word processing software that can work on MAC OSX, any advise ? Many Thanks ...

How do I move every fourth item in a folder?

I'm trying to make a script that will move every fourth item in a folder to a destination folder. So far I have: tell application "Finder" set originFolder to folder choose folder set dest1Folder to folder choose folder set dest2Folder to folder choose folder set quarter to 1 repeat with i from 1 to count of items in...

MySQL and PHP communication problem in Mac OS X 10.6.3

I followed this instruction but not worked for me. I just wanna install and config cakephp in my new MacBook Pro and that's why I'm tried to rename my php.ini.default to php.ini. Before that, I had no problem in communicating between my MySQL and Mac pre-installed PHP. What's wrong with that instruction. ( specially "Getting MySQL and ...

Core Animation delegate not called

I must be doing something wrong obviously. My delegate doesn't get called when I set the frame of a view. Frame version NOT working -(void)someMethod { CAAnimation *anim = [CABasicAnimation animation]; [anim setDelegate:self]; [[currentViewController view] setAnimations:[NSDictionary dictionaryWithObject:anim forKey:@"frame...