Pregunta

I know that i can use PyObjC to access Cocoa objects in Python. Can i do this with C++? What other languages can i use?

¿Fue útil?

Solución

You can call objective C classes directly from Objective-C++ (.mm extension). Objective-C++ allows you to mix C++ and Objective-C

Also from the wikipedia page:

The Cocoa frameworks are written in Objective-C, and hence Objective-C is the preferred language for development of Cocoa applications. Java bindings for the Cocoa frameworks (known as the "Java bridge") are also available but have not proven popular amongst Cocoa developers. Further, the need for runtime binding means many of Cocoa's key features are not available with Java. In 2005, Apple announced that the Java bridge was to be deprecated, meaning that features added to Cocoa in Mac OS X versions later than 10.4 would not be added to the Cocoa-Java programming interface. Originally, Applescript Studio could be used to develop less complex Cocoa applications.[4] However, as of Snow Leopard, it has been deprecated. It was replaced with ApplescriptObjC, which allows you to program in Applescript, while using Cocoa frameworks. [5] Third-party bindings available for other languages include Clozure CL, LispWorks, PyObjC (Python), RubyCocoa (Ruby), CamelBones (Perl), Cocoa#, Monobjc (C#) and NObjective(C#).[6] Nu uses the Objective-C object model directly, and therefore can use the Cocoa frameworks without requiring a binding. There are also open source implementations of major parts of the Cocoa framework that allows cross-platform (including Microsoft Windows) Cocoa application development, such as GNUstep, and Cocotron.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top