Skip to content

Instantly share code, notes, and snippets.

@chrislerum
Last active August 29, 2015 14:15
Show Gist options
  • Save chrislerum/07ed62c7fc9d80e30171 to your computer and use it in GitHub Desktop.
Save chrislerum/07ed62c7fc9d80e30171 to your computer and use it in GitHub Desktop.
class BoxesLayout < MK::Layout
view :one
def layout
add OneViewController.new.view, :one
end
def one_style
background_color "#ff0000".uicolor
frame [[0, 200], ['50%', 100]]
end
end
class BoxesViewController < UIViewController
def loadView
@layout = BoxesLayout.new
self.view = @layout.view
end
end
Simulate ./build/iPhoneSimulator-8.1-Development/dundler.app
(lldb) command source -s 0 '/var/folders/s1/gvjk3pbd7nq9s2npxh0mv47h0000gn/T/_simgdbcmds_ios'
Executing commands in '/private/var/folders/s1/gvjk3pbd7nq9s2npxh0mv47h0000gn/T/_simgdbcmds_ios'.
(lldb) process attach -p 40814
Process 40814 stopped
Executable module set to "/usr/lib/dyld".
Architecture set to: x86_64-apple-ios.
(lldb) command script import /Library/RubyMotion/lldb/lldb.py
(lldb) breakpoint set --name rb_exc_raise
Breakpoint 1: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) breakpoint set --name malloc_error_break
Breakpoint 2: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) continue
Process 40814 resuming
(lldb) 1 location added to breakpoint 1
(lldb) 1 location added to breakpoint 2
Process 40814 stopped
* thread #1: tid = 0x232d93, 0x00000001006d65d1 libobjc.A.dylib`lookUpImpOrForward + 79, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x41e589485590)
frame #0: 0x00000001006d65d1 libobjc.A.dylib`lookUpImpOrForward + 79
libobjc.A.dylib`lookUpImpOrForward + 79:
-> 0x1006d65d1: cmpl $0x0, (%rax)
0x1006d65d4: js 0x1006d669e ; lookUpImpOrForward + 284
0x1006d65da: movl $0x2d, %edi
0x1006d65df: callq 0x1006e410e ; symbol stub for: pthread_getspecific
(lldb)
class OneLayout < MK::Layout
view :button_in_one
def layout
@button_in_one = add UIButton, :button_in_one
end
def button_in_one_style
background_color "#0000ff".uicolor
frame [[0, 0], ['50%', 50]]
title 'PUSH ONE'
end
end
class OneViewController < UIViewController
def loadView
@layout = OneLayout.new
self.view = @layout.view
@button_in_one = @layout.button_in_one
end
def viewDidLoad
@button_in_one.on(:touch) do
puts 'THIS CRASHES'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment