[SVN] Revision 1612 (ImageBrowser)
Kumar McMillan
kumar.mcmillan at gmail.com
Mon Aug 29 17:39:09 UTC 2005
Hmm..
I ran the Tiger fix script, still getting the same exception. Then I
installed a newer 1.8.2 Ruby package from
http://homepage.mac.com/discord/Ruby/ and now have your exact same
version:
ruby 1.8.2 (2004-12-25) [powerpc-darwin7.8.0]
... but still getting the same exception. I do seem to be in the
minority here however :(
Could it be that I need another library of some kind?
I changed your eval() call to self.method("measure_" + @img_type).call
and seemed to at least give a better traceback:
/Users/kumar/Library/Application
Support/TextMate/Bundles/ImageBrowser.tmbundle/Tools/image_size.rb:126:in
`measure_JPEG': undefined method `unpack' for nil:NilClass
(NoMethodError) from /Users/kumar/Library/Application
Support/TextMate/Bundles/ImageBrowser.tmbundle/Tools/image_size.rb:78:in
`call' from /Users/kumar/Library/Application
Support/TextMate/Bundles/ImageBrowser.tmbundle/Tools/image_size.rb:78:in
`initialize' from (erb):66:in `new' from (erb):66 from (erb):65:in
`open' from (erb):65 from (erb):59:in `glob' from (erb):59
... which is :
marker, code, length = @img_data.read_o(4).unpack('aav')
Here is a diff on the eval() line I changed:
Index: /Users/kumar/Library/Application
Support/TextMate/Bundles/ImageBrowser.tmbundle/Tools/image_size.rb
===================================================================
--- /Users/kumar/Library/Application
Support/TextMate/Bundles/ImageBrowser.tmbundle/Tools/image_size.rb (revision
1628)
+++ /Users/kumar/Library/Application
Support/TextMate/Bundles/ImageBrowser.tmbundle/Tools/image_size.rb (working
copy)
@@ -74,8 +74,9 @@
raise("img_type is failed. #{img_type}\n") if match == false
@img_type = img_type
end
-
- eval("@img_width, @img_height = measure_" + @img_type + "()") if
@img_type != Type::OTHER
+
+ @img_width, @img_height = self.method("measure_" +
@img_type).call if @img_type != Type::OTHER
+ #eval("@img_width, @img_height = measure_" + @img_type + "()") if
@img_type != Type::OTHER
end
# get parameter
... hope this helps because I am not sure why read_o would be returning Nil
- K
On 8/26/05, textmate at mac.com <textmate at mac.com> wrote:
> On 26 Aug 2005, at 21:34, Kumar McMillan wrote:
>
> > Let me know if that still doesn't reproduce it for you, then I'll try
> > updating ruby.
>
> Thanks for the image. It actually works fine on my system, so I guess
> it could be your Ruby install that's causing the problem (the default
> Ruby install in Tiger is apparently broken [1]).
>
> Cheers,
>
> Rich
>
> [1] http://www.macosxhints.com/article.php?story=20050526080438129
> _______________________________________________
> textmate-dev mailing list
> textmate-dev at lists.macromates.com
> http://lists.macromates.com/mailman/listinfo/textmate-dev
>
More information about the textmate-dev
mailing list