在Mac OS中相当于COM是什么? [英] what is the equivalent of COM in Mac OS?

查看:248
本文介绍了在Mac OS中相当于COM是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Mac编程世界的新手。有人可以告诉我什么相当于可重用的COM组件在Mac和一些链接到一个好的资源开始(在创建可重用的类COM组件和引用来自调用应用程序的组件)?谢谢。

I'm new to the world of Mac programming. Can someone please tell me what the equivalent of reusable COM components are in Mac and some links to a good resource to get started (in creating reusable COM-like components and referring those components from a calling app)? Thank you.

说明:

- 我想知道是否存在类似的技术,这在操作系统级别是支持的。

- 我问这个问题,因为我想把我的一些应用程序(使用现有的类型库从Windows以及我做的),到Mac。

- 是可能的

Clarification:
- I wish to know if there exist a similar technology, which is supported at OS level.
- I asked the question because I want to port some of my apps (which make use of existing type libraries from Windows as well as those that I make) to Mac.
- Is it possible that I create wrapper classes for my existing (Window) type libraries and refer to them from a Mac app?

推荐答案

Cocoa / Objective- C对象几乎是你需要的。在更高的层次上,NIB可以在应用程序之间重用,虽然我不认为这是广泛完成的。

Cocoa/Objective-C objects are pretty much all you need. At a higher level, NIBs can be reusable between applications, although I don't think that is widely done.

您可以编写插件以使用Interface Builder

You can write plug-ins for Interface Builder to use your own components like the standard ones.

Apple Events和AppleScript是标准的IPC和脚本技术。

Apple Events and AppleScript are the standard IPC and scripting technologies.

,与Windows中的COM不同,对于通过标准接口相互交互,存在于标准容器中,参与事务等的组件,实际上没有标准约定。没有类型库或IDL的模拟(虽然脚本字典可能会接近)。

However, unlike COM in the Windows world, there are really no standard conventions for components that interact with one another via standard interfaces, live in standard containers, participate in transactions, etc. There is no analogue to a type library or IDL (although a scripting dictionary may come close).

这篇关于在Mac OS中相当于COM是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆