From: Shane L. <sh...@sh...> - 2007-07-10 01:37:07
|
Hello all. I've been hacking away at this problem for a few weeks now, and I'm not even sure that RubyCocoa is the right tool for the job, so please be gentle with me if I'm barking up the wrong tree. What I am trying to do is embed a Ruby scripting engine into my application. The app has a central engine written in C++ and an editor interface written in Cocoa. I'm currently using SWIG to glue my C++ objects into Ruby. Everything is actually working OK, but to get my C++ code into Ruby it has to be compiled into its own bundle, which ends up separate from main application, thus I'm unable to manipulate any of the objects in there. My current hope is that I could make the whole thing into a RubyCocoa application, load up my bundle once, and be done with it. But before I go redoing my architecture entirely, I wanted to get a sanity check to see if this was a smart way of doing things. I realize by going C++ --> SWIG --> Cocoa --> Ruby may just introduce too many links into the chain, and also worry that RubyCocoa, being designed to implement with ObjC, won't play as nicely with SWIG-wrapped C++. Has anyone else tried to do something along these lines? Are there any open source examples available? I would appreciate any advice. |