开发者

How do I make Interface Builder recognize IBOutlet/IBAction for new languages?

it's a theoretical question: suppose I come up with an outstanding new scripting language and want to make a Cocoa bridge for that.

Is it possible to make Interface Builder recognize the new language and parse the source code automatically so that it can list the IBActions and IBOutlets, just as it already does for Objective-C's .h, RubyCocoa's .rb, and PyObjC's .py, and AppleScriptObjC's .applescript files? Or is 开发者_Go百科it hard-coded into Interface Builder?

If it's possible, how can I do it and/or is there a document?


AFAIK this is not documented.

Matt Gallagher did a post a while back on the interprocess communication between Xcode and IB Interprocess Communication

Using those techniques, you may be able to pull something off.

Another thought is to capitalize on what IB already does and generate a .h file with the appropriate IB markers for your language of choice - e.g. write out a .h file with the elements you want exposed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜