Ticket #8 (closed defect: fixed)
getting NSSize from NSImage from artwork doesn't work
| Reported by: | jordan.breeding@… | Owned by: | lsansonetti@… |
|---|---|---|---|
| Priority: | blocker | Milestone: | MacRuby 0.1 |
| Component: | MacRuby | Keywords: | |
| Cc: |
Description
I am guessing that this isn't working because of ScriptingBridge problems related to bugs 6 & 7.
irb(main):001:0> framework("Cocoa")
=> true
irb(main):002:0> framework("ScriptingBridge")
=> true
irb(main):003:0> itunes = SBApplication.applicationWithBundleIdentifier("com.apple.iTunes")
=> #<ITunesApplication:0x192ac80>
irb(main):004:0> tracks = itunes.sources.objectWithName("Library").userPlaylists.objectWithName("Music").fileTracks
=> #<SBElementArray:0x12a8f20>
irb(main):005:0> tracks.get.arrayByApplyingSelector("artworks").objectAtIndex(0).objectAtIndex(0)
=> #<ITunesArtwork:0x129f700>
irb(main):006:0> tracks.get.arrayByApplyingSelector("artworks").objectAtIndex(0).objectAtIndex(0).data
=> #<NSImage:0x19d06f0>
irb(main):007:0> tracks.get.arrayByApplyingSelector("artworks").objectAtIndex(0).objectAtIndex(0).data.size
(irb):7: [BUG] Unrecognized octype `{_NSSize=ff}'
MacRuby version 0.1 (ruby 1.9.0 2008-02-18 revision 0) [i686-darwin9.2.0]
-- control frame ----------
c:0024 p:---- s:0073 b:0073 l:000072 d:000072 CFUNC :size
c:0023 p:0045 s:0070 b:0070 l:000ba4 d:000069 EVAL (irb):7
c:0022 p:---- s:0069 b:0069 l:000068 d:000068 FINISH :empty?
c:0021 p:---- s:0067 b:0067 l:000066 d:000066 CFUNC :eval
c:0020 p:0023 s:0060 b:0060 l:000059 d:000059 METHOD /usr/local/lib/ruby/1.9.0/irb/workspace.rb:80
c:0019 p:0025 s:0053 b:0052 l:000051 d:000051 METHOD /usr/local/lib/ruby/1.9.0/irb/context.rb:218
c:0018 p:0024 s:0047 b:0047 l:002324 d:000046 BLOCK /usr/local/lib/ruby/1.9.0/irb.rb:149
c:0017 p:0025 s:0040 b:0040 l:000039 d:000039 METHOD /usr/local/lib/ruby/1.9.0/irb.rb:262
c:0016 p:0009 s:0035 b:0035 l:002324 d:000034 BLOCK /usr/local/lib/ruby/1.9.0/irb.rb:146
c:0015 p:0093 s:0032 b:0032 l:000021 d:000031 BLOCK /usr/local/lib/ruby/1.9.0/irb/ruby-lex.rb:243
c:0014 p:---- s:0032 b:0032 l:000031 d:000031 FINISH :block_given?
c:0013 p:---- s:0030 b:0030 l:000029 d:000029 CFUNC :loop
c:0012 p:0007 s:0027 b:0027 l:000021 d:000026 BLOCK /usr/local/lib/ruby/1.9.0/irb/ruby-lex.rb:230
c:0011 p:---- s:0028 b:0028 l:000027 d:000027 FINISH :each
c:0010 p:---- s:0026 b:0026 l:000025 d:000025 CFUNC :catch
c:0009 p:0017 s:0022 b:0022 l:000021 d:000021 METHOD /usr/local/lib/ruby/1.9.0/irb/ruby-lex.rb:229
c:0008 p:0034 s:0019 b:0019 l:002324 d:002324 METHOD /usr/local/lib/ruby/1.9.0/irb.rb:145
c:0007 p:0009 s:0016 b:0016 l:00224c d:000015 BLOCK /usr/local/lib/ruby/1.9.0/irb.rb:69
c:0006 p:---- s:0017 b:0017 l:000016 d:000016 FINISH :(null)
c:0005 p:---- s:0015 b:0015 l:000014 d:000014 CFUNC :catch
c:0004 p:0152 s:0011 b:0011 l:00224c d:00224c METHOD /usr/local/lib/ruby/1.9.0/irb.rb:68
c:0003 p:0033 s:0006 b:0006 l:000005 d:000005 TOP /usr/local/bin/irb:12
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :inherited
c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP
---------------------------
DBG> : "(irb):7:in `irb_binding'"
DBG> : "/usr/local/lib/ruby/1.9.0/irb/workspace.rb:80:in `eval'"
DBG> : "/usr/local/lib/ruby/1.9.0/irb/workspace.rb:80:in `evaluate'"
DBG> : "/usr/local/lib/ruby/1.9.0/irb/context.rb:218:in `evaluate'"
DBG> : "/usr/local/lib/ruby/1.9.0/irb.rb:149:in `block (2 levels) in eval_input'"
DBG> : "/usr/local/lib/ruby/1.9.0/irb.rb:262:in `signal_status'"
DBG> : "/usr/local/lib/ruby/1.9.0/irb.rb:146:in `block in eval_input'"
DBG> : "/usr/local/lib/ruby/1.9.0/irb/ruby-lex.rb:243:in `block (2 levels) in each_top_level_statement'"
DBG> : "/usr/local/lib/ruby/1.9.0/irb/ruby-lex.rb:230:in `loop'"
DBG> : "/usr/local/lib/ruby/1.9.0/irb/ruby-lex.rb:230:in `block in each_top_level_statement'"
DBG> : "/usr/local/lib/ruby/1.9.0/irb/ruby-lex.rb:229:in `catch'"
DBG> : "/usr/local/lib/ruby/1.9.0/irb/ruby-lex.rb:229:in `each_top_level_statement'"
DBG> : "/usr/local/lib/ruby/1.9.0/irb.rb:145:in `eval_input'"
DBG> : "/usr/local/lib/ruby/1.9.0/irb.rb:69:in `block in start'"
DBG> : "/usr/local/lib/ruby/1.9.0/irb.rb:68:in `catch'"
DBG> : "/usr/local/lib/ruby/1.9.0/irb.rb:68:in `start'"
DBG> : "/usr/local/bin/irb:12:in `<main>'"
-- backtrace of native function call (Use addr2line) --
0x2dfbf9
0x1d833e
0x1d83eb
0x2e85cc
0x2eab27
0x95c7b424
0x2de057
0x2ddf8c
0x2d5549
0x2dcf9c
0x1e29ee
0x1e2cac
0x2ceca5
0x2de057
0x2d5549
0x2dcf9c
0x2dd7fb
0x1db83a
0x1dafa4
0x1db0b7
0x2de057
0x2d5549
0x2dcf9c
0x2dd7fb
0x1dbb1f
0x2ceca5
0x2de057
0x2d5549
0x2dcf9c
0x2dd7fb
0x1dbb1f
0x2ceca5
0x2de057
0x2d5549
0x2dcf9c
0x2dd222
0x1db364
0x1e40d1
0x1fdf
0x1f46
0x2
-------------------------------------------------------
zsh: abort /usr/local/bin/irb
Change History
Note: See
TracTickets for help on using
tickets.

