[MacRuby] #1406: CGUnregisterScreenRefreshCallback doesn't unregister the callback
MacRuby
ruby-noreply at macosforge.org
Mon Oct 10 16:51:09 PDT 2011
#1406: CGUnregisterScreenRefreshCallback doesn't unregister the callback
---------------------------+------------------------------------------------
Reporter: haxie1@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone: MacRuby 0.11
Component: MacRuby | Keywords:
---------------------------+------------------------------------------------
{{{
framework 'ApplicationServices'
framework 'Cocoa'
class Tester
def start
@callback = Proc.new do |count, rects, userInfo|
puts "callback"
end
err = CGRegisterScreenRefreshCallback(@callback, nil)
end
def stop
puts "stopping"
CGUnregisterScreenRefreshCallback(@callback, nil)
end
end
t = Tester.new
t.start
trap("INT") {
t.stop
#exit 0
}
NSApplication.sharedApplication.run
}}}
Using the above code, I can get screen refresh callbacks, but when I try
to stop and unregister, I keep getting called back until I kill my
terminal session. I wrote an equiv. ObjC test app and it works fine. I can
post that if needed.
Cheers,
kam
--
Ticket URL: <http://www.macruby.org/trac/ticket/1406>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list