views:

296

answers:

1

Hi, 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 it hard-coded into Interface Builder?

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

A: 

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.

Jeff Schilling
Thanks for your comment. Your second suggestion does sound the most future-proof solution! But I need to come up with a new scripting language first :p
Yuji