REPL output
quadrant_view.rb:63:in `getLinearShadingFunctionRef:': expected instance of Pointer, got `#<Proc:0x7fcf0b727db0>' (Proc) (TypeError)
from quadrant_view.rb:105:in `paintQuadrantBase:'
type expected by CGFunctionCallbacks.type
(main)> CGFunctionCallbacks.type
=> "{CGFunctionCallbacks=I^?^?}"
Apple docs mention that ? is used for function pointers. See: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html
RubyMotion docs for Pointer do not list function pointers. http://www.rubymotion.com/developer-center/api/Pointer.html
REPL crashes when running:
(terminal output)
(main)> Pointer.new('?')
Can't find pointer description for type `?'
================================================================================
The application terminated. A crash report file may have been generated by the
system, use `rake crashlog' to open it. Use `rake debug=1' to restart the app
in the debugger.
================================================================================
(first few lines of crashdump output)
Process: SpinzyMac [10864]
Path: /Users/USER/*/SpinzyMac.app/Contents/MacOS/SpinzyMac
Identifier: com.yourcompany.SpinzyMac
Version: 1.0 (1.0)
Code Type: X86-64 (Native)
Parent Process: sim [10863]
Responsible: Terminal [399]
User ID: 501
Date/Time: 2014-01-13 15:04:45.020 -0500
OS Version: Mac OS X 10.9.1 (13B42)
Report Version: 11
Anonymous UUID: 2FFFD72A-A3E0-1BFD-4426-65FAC670F94A
Sleep/Wake UUID: D514428B-8BA0-4E72-8B3E-6FCED7BF25BD
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00000001130c6866 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00000001131d435c pthread_kill + 92
2 libsystem_c.dylib 0x0000000112ffcc5a __abort + 145
3 libsystem_c.dylib 0x0000000112ffcbc9 abort + 140
4 com.yourcompany.SpinzyMac 0x000000010ef50248 rb_pointer_s_new(unsigned long, objc_selector*, int, unsigned long*) + 360