Fujimoto Hisa
hisa****@fobj*****
Tue Feb 6 21:11:33 JST 2007
Hi jean-pierre, thanks for your help about TextMate plugin! Now I'm working on bundle support especially around the NSBundle.bundleForClass. The basic strategy is replace the original NSBundle.bundleForClass with the RubyCocoa version. it may be almost same strategy as the PyObjC though the implementation is a bit different. It manages an mapping to bind an Objective-C class defined in ruby program with an appropriate bundle instead of the mainbundle. Currently I'm experimenting with some implementations (by mapping table, by method, ...) with two bundle examples (SIMBL plugin named RubyAnywhere and Voodoo ruby plugin enabler). I'll commit it into the repos after more experimentation and cleaning up it. So please wait for a while. thanks -- hisa On 2007/02/06, at 15:53, jeanp****@gmail***** wrote: > > hi hi - > > i have been trying to use your new RBBundleInit function to > initialize rubycocoa inside an existing application process, but > thus far have not had any luck. i've downloaded your SIMBL example > and it works (after i changed 'RubyOnSIMBLLoader' to > '[RubyOnSIMBLLoader class]') but for some reason i am not able to > get an NSBundle working elsewhere. > > i created a textmate plugin and am trying to initialize rubycocoa > in its default initializer. the plugin itself is written in objC > but also includes a ruby class, initialized in RBBundleInit(). then > from a textmate command, i invoke some rubycocoa commands - simple > commands like: > OSX::NSSound.soundNamed("Pop").play > work however, commands that interact with the windowserver (alert/ > window) do not work: > > /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/ > oc_wrapper.rb:48:in `ocm_send': NSInternalInconsistencyException - > Error (1002) creating CGSWindow (OSX::OCException) > from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/ > objc/oc_wrapper.rb:48:in `method_missing' > from /Volumes/local/Users/jpm/Library/Application Support/ > TextMate/PlugIns/RubyCocoa.tmplugin/Contents/Resources/RubyCocoa.rb: > 35:in `window' > from /tmp/temp_textmate.NudS45:15 > > i've attached the source to my plugin and the command i am using - > might you have any ideas? > > thank you for any help you can provide. > best, > jean-pierre > > > > On 1/23/07, Fujimoto Hisa <hisa****@fobj*****> wrote: Hi > > To develop a bundle (plugin), I've commited new (tentative) API > RBBundleInit on the apple-unstable branch (r1479). This is a fairly > experimental implementation. > > And put an example Xcode template for a SIMBL > (http://www.culater.net/software/SIMBL/SIMBL.php) plugin bundle into > the url: > > http://rubycocoa.sourceforge.net/files/RubyOnSIMBL-20070123.tgz > > This add Ruby menu into a host application (default is TextEdit in > Info.plist). Required for svn revision 1479 of the apple-unstable. > > again notice these are *SUPER EXPERIMENTAL BUGGY IMPLEMENTATION*. > > I should prepare Voodoo Pad plugin example as well, but I'm sorry I > can't do yet. I hope this example may be helpful for you. > > thanks > -- > hisa > > _______________________________________________ > Rubycocoa-devel mailing list > Rubyc****@lists***** > http://lists.sourceforge.jp/mailman/listinfo/rubycocoa-devel > > <RubyCocoa.tar.bz2> > <RubyCocoa test.tmCommand>