Arc Restrictions and Semantic issues using DDHotKey

679 views Asked by At

I'm trying to use DDHotKey for global hotkeys in a program I'm writing, however I can't get the program to compile because DDHotKeyCenter.m has errors.

The errors are below... errors

I'm assuming this has something to do with my project settings, because the DDHotKey demo compiles and runs fine.

I've tried disabling arc, converting to arc, both with no success.

I'm still new to Cocoa, so I don't have any other ideas as to what could be causing this.

Any help is appreciated.

Edit: Errors when Arc is disabled... more errors

1

There are 1 answers

8
deanWombourne On BEST ANSWER

You're right - it looks like those files aren't ARC ready. However, if you're getting these messages then it means that the rest of your project is :)

Luckily, you can disable arc for specific files in your project.

In the build phases tab of the project settings, look at the compile sources section. Next to the files that are getting error (i.e. DDHotKeyCenter.m) add the compiler flag -fno-objc-arc - this will tell the compiler not to use ARC for this file only.

Just repeat that for each file complaining about release, retain, autorelease etc. and see how you get on.