[MacRuby] #475: GCD Queues should print their label as their "to_s" method
#475: GCD Queues should print their label as their "to_s" method ----------------------------------------+----------------------------------- Reporter: ernest.prabhakar@… | Owner: lsansonetti@… Type: enhancement | Status: new Priority: blocker | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Right no, GCD Queues have a generic (i.e., mostly useless) "to_s" method. Why not just make the GCD "label" method act as to_s: http://github.com/masterkain/macruby/blob/master/gcd.c rb_objc_define_method(cQueue, "to_s", rb_queue_label, 0); That avoids additional API, and lets it generally "do the right thing" -- Ticket URL: <http://www.macruby.org/trac/ticket/475> MacRuby <http://macruby.org/>
#475: GCD Queues should print their label as their "to_s" method ----------------------------------------+----------------------------------- Reporter: ernest.prabhakar@… | Owner: lsansonetti@… Type: enhancement | Status: new Priority: blocker | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by ernest.prabhakar@…): Labels should be strings, and should be unique PROPOSAL alias to_s to label Modify inspect to add label as well as the pointer description Should not crash on null label -- Ticket URL: <http://www.macruby.org/trac/ticket/475#comment:1> MacRuby <http://macruby.org/>
#475: GCD Queues should print their label as their "to_s" method ----------------------------------------+----------------------------------- Reporter: ernest.prabhakar@… | Owner: lsansonetti@… Type: enhancement | Status: new Priority: blocker | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by ernest.prabhakar@…): Fixed in revision r3095. Don't remove to the old API. -- Ticket URL: <http://www.macruby.org/trac/ticket/475#comment:2> MacRuby <http://macruby.org/>
#475: GCD Queues should print their label as their "to_s" method ----------------------------------------+----------------------------------- Reporter: ernest.prabhakar@… | Owner: lsansonetti@… Type: enhancement | Status: closed Priority: blocker | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------------+----------------------------------- Changes (by ernest.prabhakar@…): * status: new => closed * resolution: => fixed -- Ticket URL: <http://www.macruby.org/trac/ticket/475#comment:3> MacRuby <http://macruby.org/>
#475: GCD Queues should print their label as their "to_s" method ----------------------------------------+----------------------------------- Reporter: ernest.prabhakar@… | Owner: lsansonetti@… Type: enhancement | Status: closed Priority: blocker | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------------+----------------------------------- Comment(by ernest.prabhakar@…): Note: because of the way Ruby defines "inspect" it automatically uses "to_s"; if you want to also include additional information in inspect (e.g., the objectID or even GCD pointer), file a new bug -- Ticket URL: <http://www.macruby.org/trac/ticket/475#comment:4> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby