[MacRuby] #767: Some minor issues with framework constants
#767: Some minor issues with framework constants ----------------------------+----------------------------------------------- Reporter: jazzbox@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.7 Component: MacRuby | Keywords: ----------------------------+----------------------------------------------- Issue 1: {{{ $ macruby -e "framework 'AddressBook'; p KABEmailMobileMeLabel" unknown: [BUG] cannot locate symbol for BridgeSupport constant `kABEmailMobileMeLabel' MacRuby 0.7 (ruby 1.9.2) [universal-darwin10.0, x86_64] Abort trap }}} I think that's because this constant is defined in the Mac OS X v10.6 SDK only. Issue 2: {{{ $ macruby -e "framework 'Foundation'; p KCFAllocatorUseContext" Segmentation fault }}} I ran into this when iterating over the constants in a framework: {{{ oc = Object.constants framework 'Foundation' (Object.constants - oc).each do |c| puts "#{c} = #{eval(c).inspect}" end }}} In MacRuby 0.5 KCFAllocatorUseContext isn't accessible! -- Ticket URL: <http://www.macruby.org/trac/ticket/767> MacRuby <http://macruby.org/>
#767: Some minor issues with framework constants ----------------------------+----------------------------------------------- Reporter: jazzbox@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.7 Component: MacRuby | Keywords: ----------------------------+----------------------------------------------- Comment(by lsansonetti@…): Good catch! For kCFAllocatorUseContext, it crashes because the constant is declared as a CFType but it is set to a magic value (0x03ab). -- Ticket URL: <http://www.macruby.org/trac/ticket/767#comment:1> MacRuby <http://macruby.org/>
#767: Some minor issues with framework constants ----------------------------+----------------------------------------------- Reporter: jazzbox@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------+----------------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed Comment: This should be better in r4332, at least we shouldn't segfault. A RuntimeError exception will now be raised in case a constant whose symbol cannot be located is accessed. Similarly, magic cookies will raise a similar exception. I originally wanted to write support for them but realized that KCFAllocatorUseContext is the only magic cookie that ships in the system, and it's not something critical for now. -- Ticket URL: <http://www.macruby.org/trac/ticket/767#comment:2> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby