Subscribe: Comments for Coffee & Cocoa
http://www.martinkahr.com/comments/feed/
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
carbon  cocoa code  cocoa  code  comment remote  comment  control wrapper  core animation  core  keys eclipse  nsarray  object  string 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Comments for Coffee & Cocoa

Comments for Coffee & Cocoa



hot bits and bytes



Published: Sun, 18 May 2008 10:49:23 +0000

 



Comment on Mac Keys for Eclipse by gabe

Fri, 25 Apr 2008 19:48:17 +0000

Just a note: shift+z should redo




Comment on Composition Builder by martin

Wed, 09 Apr 2008 07:24:22 +0000

Please contact the guys at ToolsOnAir to get a demo version. They removed the download section from their website. Email to sales@toolsonair.com




Comment on Composition Builder by Darnell Peacock

Tue, 08 Apr 2008 20:24:27 +0000

Where is the downloadable version of Composition Builder????




Comment on NSCell Image and Text Sample by glazed

Tue, 11 Mar 2008 08:00:32 +0000

Guys...

check this out: http://kupuk.com/2007/10/08/custom-nscells-with-nsmanagedobjects/

It describes a solution for using managed objects in the multi-value custom cells.




Comment on Remote Control Wrapper 2.0 by vinay

Sat, 08 Mar 2008 13:21:56 +0000

Thanks for publishing this. It will be very useful to my application.




Comment on Remote Control Wrapper 2.0 by martin

Wed, 30 Jan 2008 17:52:19 +0000

Hi Jim,

I'm a Cocoa guy and try to avoid Carbon if possible :-) Let's see if I can help.

Objective-C is a object orientated language. These means you are executing functions on objects. The Carbon based APIs are in some sense object orientated as well. The main difference is that you are using a number of functions where you provide the data structure in the first parameter.

Let's see how some Cocoa code converts to Carbon code: // allocate an Array - there are two function calls: alloc and init here NSMutableArray* a = [[NSMutableArray alloc] init]; // allocate a string object - the next line defines a string object (compareable to CFStringRef) NSString* value = @"some string"; // here we call the function addObject [a addObject: @"some string"];

In Carbon it would look like this: CFMutableArrayRef a = CFArrayCreateMutable(NULL, 0, NULL); CFStringRef value = CFSTR("some string"); CFArrayAppendValue(a, value);

So it's pretty straight forward to convert Cocoa code to Carbon code as long as there are matching methods in both frameworks. You can even mix Carbon and Cocoa code pretty easy.

NSArray is “toll-free bridged” with its Core Foundation counterpart, CFArray. What this means is that the Core Foundation type is interchangeable in function or method calls with the bridged Foundation object, providing you cast one type to the other. Therefore, in an API where you see an NSArray * parameter, you can pass in a CFArrayRef, and in an API where you see a CFArrayRef parameter, you can pass in an NSArray instance. This arrangement also applies to your concrete subclasses of NSArray. See Carbon-Cocoa Integration Guide for more information on toll-free bridging.

hope this helps.




Comment on Mac Keys for Eclipse by Anonymous

Wed, 30 Jan 2008 17:40:04 +0000

Thanks for the info Andre. Cocoa is for sure the way to go. Now that the Java-Cocoa bridge is deprecated, SWT-Cocoa will be the way to write Cocoa apps with Java. I'm looking forward to it.




Comment on Mac Keys for Eclipse by Andre

Tue, 29 Jan 2008 18:41:01 +0000

martin: Work is now being done towards a Cocoa based version of SWT: http://www.eclipse.org/swt/




Comment on Remote Control Wrapper 2.0 by Jim Crompton

Tue, 29 Jan 2008 13:35:22 +0000

"For interacting with the device the IOKit framework is being used. This a C based API. So when you extract the code from the Objective-C classes you can use it in Carbon based applications as well. You have to translate the NSArray/NS… to CFArray/CF… code as well of course."

I'd really, really, really like to be able to understand that - but I'm a pure Carbon head and don't do Cocoa. Any chance of a quick Carbon guide?




Comment on AlterEgo, Core Animation and Divide & Conquer by Scott

Mon, 14 Jan 2008 01:59:22 +0000

OsOnG

I'm not sure that this is true. This is certainly an example of where you could use Core Animation, but I don't think iChat was re-written in this respect to use Core Animation (since the functionality has been there for longer than CA has been around)