From: Allison N. <dem...@ma...> - 2010-02-15 21:58:37
|
OK, I don't have Snow Leopard installed, so I can't figure this one out. gen_bridge_doc works basically by identifying all of the key frameworks, finding their original reference documentation, scraping the class information out of the html files, and then reformatting it into RubyCocoa method names. The bad news is that after attempting the scraping (and I don't know if this applies to just one html file or all of them) the html parser was not able to identify some of the key information in the file, with a resulting exception being thrown. You could try, as a quick hack, patching /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/ tool/gen_bridge_doc/lib/lib/class_def.rb I think that what is happening is that in this file, in CocoaRef::ClassDef.output_file, it just isn't able to match the file up to a type. Try modifying this method to return an empty string if the type is never matched, and see what that gives you. Html scraping is always a delicate affair, if the format of the scraped doc changes even slightly, the scraper tends to fail catastrophically. as would seem to be the case here... Anyway, good luck with debugging it further. Alli Le 15 févr. 10 à 21:26, Wolfgang Kittenberger a écrit : > Hello, > > Great! Thanks for the hint! But behind this solved obstacle there > is just the next: > > myMini-2:RubyCocoa-1.0.1 kittekat$ ruby install.rb doc > install.rb: entering doc phase... > ---> framework > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby > gen_bridge_doc.rb build ../bridge-doc > mkdir -p /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/ > framework/bridge-doc > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby - > I../../ext/rubycocoa -I../../lib gen_bridge_doc/ > rdocify_framework.rb '/Developer/Documentation/DocSets/ > com.apple.ADC_Reference_Library.CoreReference.docset/Contents/ > Resources/Documents/documentation/Cocoa/Reference/ApplicationKit/' / > Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/bridge- > doc/ruby > > Working on: ApplicationKit > > mkdir -p /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/ > framework/bridge-doc/ruby > Processing reference file: CIColor_AppKitAdditions > /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/tool/ > gen_bridge_doc/lib/cocoa_ref.rb:70:in `join': can't convert nil into > String (TypeError) > from /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/ > tool/gen_bridge_doc/lib/cocoa_ref.rb:70:in `initialize' > from gen_bridge_doc/rdocify_framework.rb:174:in `new' > from gen_bridge_doc/rdocify_framework.rb:174 > from gen_bridge_doc/rdocify_framework.rb:171:in `each' > from gen_bridge_doc/rdocify_framework.rb:171 > gen_bridge_doc.rb:35:in `command': 'system /System/Library/ > Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I../../ext/ > rubycocoa -I../../lib gen_bridge_doc/rdocify_framework.rb '/ > Developer/Documentation/DocSets/ > com.apple.ADC_Reference_Library.CoreReference.docset/Contents/ > Resources/Documents/documentation/Cocoa/Reference/ApplicationKit/' / > Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/bridge- > doc/ruby' failed (RuntimeError) > from gen_bridge_doc.rb:39:in `ruby' > from gen_bridge_doc.rb:99 > from gen_bridge_doc.rb:98:in `each' > from gen_bridge_doc.rb:98 > rm -rf bridge-doc > doc failed > hook /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/ > pre-doc.rb failed: > 'system /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/ > bin/ruby gen_bridge_doc.rb build ../bridge-doc' failed > try 'ruby install.rb --help' for usage > myMini-2:RubyCocoa-1.0.1 kittekat$ > > Following your method by checking the source code in found in > "cocoa_ref.rb in line 70: > > # Check if there is a overrides file in the override_dir for > the given class > class_overrides_file = > File.join(File.dirname(File.expand_path(__FILE__)), @framework, > @class_def.output_filename) > > Looks like some option is checked. Did not find anything about an > override_dir in the --help output of install.rb. > > Anyway, here is the current configuration: > > myMini-2:RubyCocoa-1.0.1 kittekat$ ruby install.rb show > prefix /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr > install-prefix $prefix > std-ruby $install-prefix/lib/ruby/1.8 > site-ruby /Library/Ruby/Site/1.8 > bin-dir $install-prefix/bin > rb-dir $site-ruby > so-dir /Library/Ruby/Site/1.8/universal-darwin10.0 > data-dir $install-prefix/share > ruby-path /System/Library/Frameworks/Ruby.framework/Versions/1.8/ > usr/bin/ruby > ruby-prog /System/Library/Frameworks/Ruby.framework/Versions/1.8/ > usr/bin/ruby > make-prog make > without-ext no > install-root (not specified) > frameworks /Library/Frameworks > xcode-extras /Library/Application Support/Developer/Shared/Xcode/ > examples /Developer/Examples > documentation /Developer/Documentation > gen-bridge-support no > build-as-embeddable yes > ruby-header-dir /System/Library/Frameworks/Ruby.framework/Versions/ > 1.8/usr/lib/ruby/1.8/universal-darwin10.0 > libruby-path /System/Library/Frameworks/Ruby.framework/Versions/1.8/ > usr/lib/libruby.1.dylib > ri-dir /System/Library/Frameworks/Ruby.framework/Versions/1.8/ > usr/share/ri/1.8/site > macosx-deployment-target 10.6 > sdkroot (not specified) > target-archs i386 x86_64 > rubycocoa-version 1.0.1 > rubycocoa-version-short 1.0.1 > rubycocoa-release-date 2009-10-18 > rubycocoa-svn-revision 2282 > rubycocoa-framework-version A > myMini-2:RubyCocoa-1.0.1 kittekat$ > > Any hint? > > Best regards > Kittekat > |