<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16915" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=391513700-27102009><FONT face=Arial size=2>This has been 
covered before ( <A 
href="http://lists.macromates.com/textmate-dev/2009-May/013933.html">http://lists.macromates.com/textmate-dev/2009-May/013933.html</A> ), 
so I'm not hopfeul, but I thought it was worth asking again, in case anything 
has changed.  Probably not.</FONT></SPAN></DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial size=2>The responders to 
the thread linked above recommend writing Ruby modules and stuff, which I do 
when I'm working on a bundle, but what if I have a bundle and I want to call 
another bundle's commands?</FONT></SPAN></DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial size=2>Fortunately, I'm in 
control of both bundles, but for organizational and responsibility reasons, I 
don't want to combine them.  One is very utilitarian (basic FTP) and the 
other is extremely specific (stuff related to a single project I work on, has 
absolutely no relevance to anything outside of the project).  The good news 
is that I already have my bundles set up to be somewhat 
modular/class-driven.</FONT></SPAN></DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial size=2>I realize that doing 
this creates dependencies between bundles, but I'm OK with this, and feel it's 
better than recreating my FTP commands in another bundle.</FONT></SPAN></DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial size=2>One thought I had 
would be to get the TM_BUNDLE_SUPPORT value, pop off the bundle name and replace 
it with the bundle name of the target, and get to the Ruby file I need.  
But then...wouldn't any TM_BUNDLE_SUPPORT values used in the other bundle's 
scripts evalulate to the wrong place?</FONT></SPAN></DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial size=2>Would it be better 
to find a place for such universally appealing ruby files outside of 
TextMate?  Should I learn how to write plugins, and/or deposit code into 
the SUPPORT_PATH?</FONT></SPAN></DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial size=2>The original 
poster's idea seems close to my idea.  But it would be sweet to be able to 
do something like:</FONT></SPAN></DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial size=2>require 
ENV['TM_SUPPORT_PATH'] + 
'/lib/bundle_access'<BR>BundleAccess.executeCommand("Some Bundle", "Some 
Command", argin)</FONT></SPAN></DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial size=2>Or something that 
could safely instantiate Ruby objects from other bundles to allow them to be 
used in your bundle without mucking with the BUNDLE_SUPPORT 
value.</FONT></SPAN></DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial size=2>I don't know...just 
spitballing.</FONT></SPAN></DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial 
size=2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=391513700-27102009><FONT face=Arial 
size=2>Dru</FONT></SPAN></DIV></BODY></HTML>