mac

How to add my program to the OS X system menu bar?

I have created a volume controller for iTunes but I would like this app to place an icon on the OS X system menu bar and have my slider controller drop down. ...

How to detect Unix terminal character encoding?

Is there a way to detect the character encoding set in the terminal which is calling my Java program? In Windows I can call the "chcp" tool and parse the output. But what about in Linux or Mac? ...

Getting started in Mac Development; No Mac.... What Do?!

Possible Duplicate: How can I develop for iPhone using a Windows development machine? Hi folks, With all the RDF et al around King Jobs' newest glass beermat, I'm getting the feeling that its a good time to add the 'iphone/ipad developer' string to my bow. One problem (two if you count not being in a financial position to s...

Adding custom UITableViewCell crashes the simulator.

Im trying to build my application using a custom UITableViewCell. This is the code in my UIViewController that adds the viewCell to the table: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@"------- Tableview --------"); static NSString *myIdentifier = @"MyId...

Apache loads any file that begins with the same string as used in url. How to prevent this?

If I point to: mywebsite.com/search and there is a file called search.php or search.html or search.inc.php or search.whatthehell.php in website's directory, Apache will point to that file instead of 404'ing. What is even more annoying is that if I point to: mywebsite.com/search/string?also=whatever Apache will still display any file...

How do you create a simple Objective-C command line project in Xcode

I'm moving from a C# VS2008 world into the Mac world and I just wanted to know how I can create a quick little command line based application so that I can write many little Objective-C apps without worrying about creating an iPhone app or whatever. Which projects do I create in Xcode? I can see the Command Line Tool under "Mac OS X" bu...

Get String Instead of Source - Xcode Cocoa

Hello everyone, I have a program that will scan the contents of a website, and display it in a textbox. The problem is that it shows the html source. For example if my html code was: <html> <body> <p>Hello</p> </body> </html> instead of just showing hello, it'll show the code above... How can I get my objective c program to just ...

call program and bash.sh from info.plist

Hello, I have a current Mac os x application, how do I modify info.plist file to include execution of update.sh script as well as program itself? I have made update.sh and put it MacOS folder inside .app, I also added one more executable via: <key>CFBundleExecutable</key> <string>update.sh</string> but it seems that It does not getti...

How can I initialize a QTMovie object with certain attributes using writable data?

I'm trying to create an empty QTMovie object that I can add segments to, and then play. This is easy to do with something like: movie = [[QTMovie alloc] initToWritableData:[NSMutableData dataWithCapacity:1048576] error:&error]; I can then use -insertSegmentOfMovie to insert segments from other movies into this one so I can play it bac...

Spotlight query to search for all archives and ISO files that their names do not end in bin

The following Spotlight query, correctly returns all archive and ISO files on my system: kind:iso OR kind:archive However, Spotlight treats .bin files as archives too and returns .bin files in the results as well. How can I modify the above query and exclude files that end in bin from the result? I tried the following query but it is...

Dynamically populated NSPopUpButtonCell menu in an NSOutlineView

I’m working with an NSOutlineView which has two columns. My dataSource supplies the outline view with a tree of items of a custom class which represents file types (that is, you initialise it with a UTI). The first column is the display name of the file type (e.g., “Source code”, “Interface Builder NIB document”, etc.). The second column...

How to change text color on Macintosh? My code uses TESetText and TEUpdate for drawing.

A naive question - i am a novice on mac programming. How to change text color on Macintosh? My code uses TESetText and TEUpdate for drawing. PS - Mac is really really badly documented. ...

recognizing computer in masm

How can I retrieve MAC of network card(s) and what can I retrieve to recognise specific computer and how ? ...

using string to read file - Xcode

The following does not work and gives me a SIGABRT when I run in the debugger: std::ifstream inFile; inFile.open("/Users/fernandonewyork/inputText.txt"); cout << inFile << endl; vector<string> inText; if (inFile) { string s4; while (inFile>>s4) { inText.push_back(s4); } } inFile.close(); The following...

How to determine the height of text in UITextView?

What is a good way to determine the current height of the content height in a UITextView? ...

PC to Macbook Pro Transition - Getting (re)started?

I'm in my second computer science course right now. I've enjoyed programming so far, but really have just scraped my way by. I've not done much programming outside of required class work. For similar reasons, I never really invested in downloading/learning software to help me program (IDE's, editors, compilers, etc). I know it sounds t...

Ruby on Rails Beta 3 Install Problem on Snow Leopard

Hello Friends, i tryed to install the new beta on my system with the command: sudo gem install rails --pre but no matter what i tryed, i still get this damn error: Successfully installed rails-3.0.0.beta3 1 gem installed Installing ri documentation for rails-3.0.0.beta3... File not found: lib Since im very very new t...

How do I use an indeterminate status indicator as the image for an NSStatusItem?

I have an application that is an NSStatusItem. It has a few different modes, each of which require an external process to be launched, during which the icon is simply highlighted, and appears to be frozen. I want to use the -setImage: method (or reasonable facsimile) to display something along the lines of a "spinner" commonly seen in ...

Garbage Collection leak? Scripting Bridge leak?

Hello everyone! I'm always really picky about memory leaks and I cannot understand why my garbage collected application leaks. My code is entirely memory-managed and it runs great without garbage collection, not a single leak. However, as soon as I turn on garbage collection it leaks! Just to prove a point, why does this leak in a garb...

Why does the Eclipse Package Explorer show the projects from two different workspaces on my Mac?

I've discovered a curious thing on my Mac. At some point I apparently created two different Eclipse workspaces, one in /Users/username/workspace and the other in /Users/username/Documents/workspace (this may have happened as a result of some troubleshooting a while ago). I never knew until now that anything was amiss because the conten...