Skip to content

Instantly share code, notes, and snippets.

@hellopatrick
Created May 4, 2012 16:57
Show Gist options
  • Save hellopatrick/2596209 to your computer and use it in GitHub Desktop.
Save hellopatrick/2596209 to your computer and use it in GitHub Desktop.
RubyMotion Queue Pointer?
queue = Dispatch::Queue.new "com.helloresolven.booth.queue"
output.setSampleBufferDelegate self, queue:queue
yields...
2012-05-04 12:53:14.275 booth[91714:10703] *** Terminating app due to uncaught exception 'TypeError', reason: 'capture_view_controller.rb:44:in `setup_session': expected instance of Pointer, got `com.helloresolven.booth.queue' (Dispatch::Queue) (TypeError)
from capture_view_controller.rb:9:in `viewDidLoad'
queue = Dispatch::Queue.new "com.helloresolven.booth.queue"
ptr = Pointer.new(:object)
ptr[0] = queue
output.setSampleBufferDelegate self, queue:ptr
yields...
2012-05-04 12:55:22.920 booth[91825:10703] *** Terminating app due to uncaught exception 'TypeError', reason: 'capture_view_controller.rb:46:in `setup_session': expected instance of Pointer of type `{dispatch_queue_s=}', got `@' (TypeError)
from capture_view_controller.rb:9:in `viewDidLoad'
'
queue = Dispatch::Queue.new "com.helloresolven.booth.queue"
ptr = Pointer.new('{dispatch_queue_s=}')
ptr[0] = queue
output.setSampleBufferDelegate self, queue:ptr
yields...
Can't find pointer description for type `{dispatch_queue_s=}'
@hellopatrick
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment