On 08/06/08 12:16, "jiho" <[EMAIL PROTECTED]> wrote:
>
> On 2008-August-06 , at 14:58 , Maxwell, Adam R wrote:
>
>>> On 2008-August-06 , at 13:59 , jiho wrote:
>>>
>>>> Now when I use the command "Bibdesk Do Completion" I get:
>>>> /tmp/temp_textmate.UNeFiD:18: undefined method `[]' for
>>>> nil:NilClass (NoMethodError)
>>>
>>>
>>> However, using "Build cite with Bibdesk", the completion works. If
>>> that helps.
>>
>> That's odd, since they should be doing the same thing. Can you post
>> the
>> BibDesk DO Completion .tmCommand script? It's working fine for me
>> with
>> latest TextMate and svn checkout of bundles.
>
> I'll try updating my bundles and support directory to svn versions too.
>
> I just reinstalled the tmCommand too so it should be the same version
> you have apart from the location of the binary. Here it is:
Looks like it's using a different method to get the latex master file. If
what you posted is currently on my site, I need to update it; sorry about
that. Here's my current one (note the added 'require' line and latexMaster
variable):
#!/usr/bin/env ruby -wKU
# for TextMate.exit
require ENV["TM_SUPPORT_PATH"] + "/lib/exit_codes.rb"
require ENV["TM_SUPPORT_PATH"] + "/lib/ui.rb"
SUPPORT = ENV['TM_SUPPORT_PATH']
DIALOG = ENV['DIALOG']
require SUPPORT + '/lib/escape'
require SUPPORT + '/lib/osx/plist'
require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/LaTeXUtils.rb"
latexMaster = LaTeX.master(ENV['TM_LATEX_MASTER'] || ENV['TM_FILEPATH'])
if !latexMaster
latexMaster = ""
end
searchTerm = STDIN.read
# omit -s to return all items
CMD = '"$HOME"/BuildProducts/Release/BibDeskTMCompletions ' + (searchTerm ==
"" ? "" : "-s #{searchTerm}") + ' -t "$TM_FILEPATH" ' + latexMaster
# returns an XML plist
plist = `#{CMD}`
# cribbed from example on pastie
res = OSX::PropertyList::load(`#{e_sh DIALOG} -up #{e_sh plist}`)
# this keeps us from overwriting on cancel
TextMate.exit_discard unless res.has_key? 'selectedMenuItem'
# insert valueForKey:@"citeKey"
print res['selectedMenuItem']['citeKey']
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users