mac

confused about macports

Hello everyone, I am using MacBook Pro Mac OS 10.5 with related version of XCode. I am new to this development environment. I am learning macports, and I read information about macports from http://www.macports.org/. But I am still confused what macports is after reading information from this site. I am previous working on Windows and ...

Positioning 1px off in Safari/Mac but works on Safari/Windows

I'm beating my head against a wall on this one; the logo image ("It's All About Revenue") shifts up by one pixel in Safari on Mac, but renders correctly in all other browser/OS combinations I've been able to test. Does anyone have any ideas on why this might be? Here's the site: http://blog.eloqua.com/ Thanks in advance for your help! ...

Application to develop & test asp.net on a mac

I'm starting to learning some asp.net so I'm looking for an application to develop asp.net using a mac. I know dreamweaver can be used to write asp.net but I don't have any application to run a test server. Wondering what my options are regarding developing and testing (not on a live server) using a mac. thanks! ...

TortoiseSVN for Mac PC?

Hello everyone, I am using a MacBook Pro running Mac OS X 10.5. I am new to this development environment, and previously worked on Windows. I find there is no TortoiseSVN for Mac PC, and I am wondering any alternative (better free and easy to use GUI tools) tools for Mac? thanks in advance, George ...

Mac event tap just delays discarded events

I'm trying to write some code that discards all keyboard and mouse events when enabled on Mac OSX 10.6. My code runs as the root user. The approach I'm taking is to create an event tap that discards all events passed to it (while enabled). The event tap callback function looks like this: CGEventRef MyTapCallback(CGEventTapProxy proxy, ...

How do I open an NSWindow and have the window selected and in focus?

I am trying to open a NSWindow using the following code: NSWindowController *window = [[NSWindowController alloc] initWithWindowNibName:@"MainWindow"]; [window showWindow:nil]; The window opens okay but the previous window is still the mainWindow and in focus. I have tried the following code to force the main window and it doesn't wo...

How to copy Eclipse app with it's all projects and space from one Mac into another?

I have a new Mac computer at the office. And I need to copy Eclipse from my home Mac. I need to keep all the setting and plugins working fine, as on my home computer. Moreover, I need to have all the SVN setting and projects working too. So, can you suggest the best option how to do it clearly, to have the final result completely the sa...

[XCode] How to reference files with environment variables ?

Hi, I was wondering if someone manage to reference files (except headers or lib) with an environment variable in XCode (mine : v3.2.1) ? There are settings that specify search paths for headers (HEADER_SEARCH_PATHS), libs (LIBRARY_SEARCH_PATHS), and even Carbon Resource (REZ_SEARCH_PATH). But how can I reference other file types for re...

Creating a NSView from a CGPath

I have a CGPath and I want to draw it once to a NSView. Seems relatively simple but I haven't found a way in AppKit (non iphone). ...

Handling mach exceptions in 64bit OS X application

I have been able to register my own mach port to capture mach exceptions in my applications and it works beautifully when I target 32 bit. However when I target 64 bit, my exception handler catch_exception_raise() gets called but the array of exception codes that is passed to the handler are 32 bits wide. This is expected in a 32 bit bui...

How do I enable spell checking within an NSTextField on Mac OS X?

I have an NSTextField that I would like to enable "as-you-type" spell checking. When I load my application I can do this from the Menu Bar > Edit > Spelling and Grammar > Check Spelling While Typing. I would like this option to be enabled by default. Within IB I can enable this for a NSTextView but I would like to use NSTextField for ...

Android Eclipse OSX Creating AVD using Terminal launches AVD Manager

I'm new to programming and working with Eclipse on a Mac. I'm trying to create a new AVD with Google Maps Support and when launch 'android' (in the SDK tools folder) I get "No command line parameters provided, launching UI". This launches the Eclipse Android SDK and AVD manager. My question is how do I create a new AVD with Google Maps ...

Java applet throws ClassNotFoundException when served under JBoss

I'm in the process of porting a prototype application developed under Tomcat to JBoss for production. Part of our app is an applet for uploading data onto the web server. Here's the code for the applet: <applet id="UploaderApplet" name="UploaderApplet" code="com.initech.uploader.AppletFrontend.class" archive="jar/Initech.Uploa...

Filtering a Core Data Fetched Property

I have a Core Data model with Items and Tags. Items may have multiple Tags, and Tags may be related to multiple Items. If I have an Item object, it has a tags attribute. Each Tag has a type, indicating that is a user tag, or a system generated tag. What I would like to do is create a fetched property on Item that would return only th...

Is there an equivalent of Mac OS X "open" command that can be called from C++/Objective-C code?

On Mac OS X there is a very useful "open" command which launches an application suitable for opened file type. Is there some C++/Objective-C function on Mac which does the same? Note: I know I could launch an "open" process. I'm just not sure if it's the best option. ...

Force 4:3 in fullscreen mode

Does anybody know how to force 4:3 when enabling fullscreen mode using OpenGL and AGL? ...

Wanting a simple overview on how to connect to a SQLite database in Cocoa/Objective-C

Hi, everyone. I've been experimenting with Cocoa and Objective-C programming on the Mac for a few months now, and I am wanting to start developing applications that manage large amounts of data. The trouble is, I'm not really sure where to start with databases. I have a good background in Java programming with SQLite. I've read a bit a...

Subversion commit failed on Mac OS X with error "no such table: rep_cache"

I created a subversion repository, imported an empty structure, checked out the repo, added a file to the working copy and tried commiting the working copy with the following commands: svnadmin create mysvn svn import -m "initial empty structure" test/ file:///tmp/mysvn svn co file:///tmp/mysvn mywc svn ci -m "test" The commit fail...

Is it possible to invoke NSDictionary's valueForKeyPath: when a key contains periods?

I'm trying to get the value of the repeatInterval key in the com.apple.scheduler plist. I'd like to just use NSDictionary's valueForKeyPath: method like so: CFPropertyListRef value; value = CFPreferencesCopyValue(CFSTR("AbsoluteSchedule"), CFSTR("com.apple.scheduler"), kCFPre...

How do you change the default collation of MySql for rake db:create:all in rails?

In my rails app I am running rake db:create:all in order to create the databases and I am prompted that the collations do not match. Is there a way to change the default MySQL collation? If not what is the best way around this? Thanks ...