mac

Getting started with Mac development

How long does it take for an experienced Windows programmer to learn writing simple software for Mac OS X? Where does one start and what tools will be necessary? ...

What are the Conventional GEM PATHS for Ruby under OS X 10.5?

I have a performance problem with my ruby on my machine, which I think I have isolated to loading libraries (when #require is called), so I'm trying to work out whether ruby is searching too many folders for libraries. When I run $ gem environment RubyGems Environment: - RUBYGEMS VERSION: 1.3.0 - RUBY VERSION: 1.8.6 (2008-03-03 pa...

How can I undo more than a single character in TextMate?

TextMate may be the best editor out there, but is has a big disadvantage: it undoes each character typed instead of grouping characters. This makes a large undo tedious! Do you now any hacks, plugins or workarounds to fix this issue? ...

Porting C++ code from Windows to the Mac

Howdy Ya'll, I'm a long time Windows developer, and it looks like I'm going to be involved in porting a Windows app to the Mac. We've decided to use Flex/Air for the gui for both sides, which looks really slick BTW. My Windows application has a C++ DLL that controls network adapters (wired and wireless). This is written using the stan...

Editing .plist files - are single quotes allowed as strings?

In particular, I'm editing the AutoCompletion.plist file for CSSEdit (if that even matters). My question is, are there any characters withing the STRING elements that need to be escaped? spaces? quotes? EDIT: Just to be clear, I'm not using CSSEdit to edit the file - rather the file is part of the CSSEdit package. I'm using TextMate to...

Are there alternatives for creating large container files that are cross platform?

Previously, I asked the question. The problem is the demands of our file structure are very high. For instance, we're trying to create a container with up to 4500 files and 500mb data. The file structure of this container consists of SQLite DB (under 1mb) Text based xml-like file Images inside a dynamic folder structure that make ...

What browser screenwidth should I design for to support Mac OS ?

Most statistics out there for browser stats show you the resolution of the screen. Thats fine for Windows where browsers typically open full screen and most people leave it as that. So if the browser stats say 1024x768 you just need to subtract a little width for the browser chrome. On a Mac however browsers typically dont open full sc...

Patching out CALLL by replacing with NOPs works in user space but not in kernel space

I have a device driver I want to patch. This device driver calls IOLog and I want to get rid of the logging. If I replace the CALLL to IOLog with (the corresponding number of) NOPs inside the device driver (kext), the kernel crashes with what looks like a smashed stack ("Backtrace terminated-invalid frame pointer 0"). The same techniqu...

How do you find the amount of free space on a mounted volume using Cocoa?

I am using the following code to determine free space on a volume. The folder was provided using NSOpenPanel. The item selected was a mounted volume and the path returned is \Volumes\Name NSDictionary* fileAttributes = [[NSFileManager defaultManager] fileSystemAttributesAtPath:folder]; unsigned long long size = [[fileAttributes object...

Best practice for maintaining updated Git binaries (Git by Git) on Mac OS X 10.5?

On my Mac OS X 10.5 (Leopard) machine, I have installed Git 1.6.0.2 using the git-OSX-Installer from Google Code. The installer installs Git to /usr/local/Git. I would now like to keep up with the latest stable Git release (Master branch), currently 1.6.0.3. Can I run "git clone git://git.kernel.org/pub/scm/git/git.git" from within the...

Cocoa 10.5 multithread app runs slowly

Got a Cocoa video capture app that works fine in 10.4. It uses NSThread to start the video capture driver. When app just started, video capture is very slow ( 1-2 fps). But after resize the UI window (or bring the window from background to foreground), video capture speed is back to normal. This only happens in 10.5. ...

Mac - Flash file not loaded in independent flash player

Hi, I am working on an independent application to play flash files on Mac. I have already done the same for Linux, and it works flawlessly but on mac for some reason flash is not drawing to my window. It is not throwing any kind of error too. I am using Flash player 10, that would mean that I am using the Core Graphics drawing model. I ...

Using Mac OS X Services-menu from a Java/Swing application

I would like to make my Java/Swing application compatible with the Services-menu available on Mac OS X. For example, so that the user could select some text in JTextArea and have it converted into speech by Services -> Speech -> Start Speaking Text. Is there a simple way to achieve that? (The application should still be able to run on pl...

equivalent to getch(), mac/linux crash

Hey guys. So I am using getch() and my app crashes instantly. Including when doing: int main() { getch(); } I can't find the link but supposedly the problem is, it needs to turn off buffering or something strange along those lines and I still want cout to work along with cross platform code. I was told to use std::cin.get(), but I'd...

What are alternatives to Objective-C for Mac programming?

I've become very comfortable in the world of pointer-free, garbage-collected programming languages. Now I have to write a small Mac component. I've been learning Objective-C, but as I confront the possibility of dangling pointers and the need to manage retain counts, I feel disheartened. I know that Objective-C now has garbage collectio...

JCanvas3D vs Canvas3D

Hi, Can anyone please tell me the issues that we face when using JCanvas3D instead of Canvas3D? How to achieve transparency using JCanvas3D? Regards, hariprasad ...

Do I have to learn Objective-C for professional Mac Development?

Do I really have to learn Objective-C to develop solid Mac Apps? As Mac users tend to use only applications that have a nice (native) GUI, i don't think that Mono and GTK+ or any Java GUI (Swing) will fit their needs. There are projects like Cocoa#, PyObjC and RubyCocoa, but are they ready for primetime? So do I really have to learn O...

Is there anything like Winsplit Revolution for Mac OS X?

Is there anything like Winsplit Revolution for Mac OS X? ...

Inspecting STL containers in XCode

From googling around it looks like XCode (3.1 in my case) should be at least trying to give me a sane debug view of STL containers - or at least vectors. However, whenever I go to look at a vector in the debugger I just see M_impl, with M_start and M_finish members (and a couple of others) - but nothing in-between! (it's a debug build, ...

std::wcout to console window in XCode

In an XCode project, if I use std::cout to write to the console the output is fine. However, if I use std::wcout I get no output. I know that this is a thorny issue in C++, and I've been googling around to try and find a specific solution in the XCode case. A couple of things I found that it was suggested should work were: std::c...