Skip to content

Instantly share code, notes, and snippets.

@dastels
Created September 28, 2013 16:13
Show Gist options
  • Select an option

  • Save dastels/6743635 to your computer and use it in GitHub Desktop.

Select an option

Save dastels/6743635 to your computer and use it in GitHub Desktop.
Why is initWithFrame: not working in RubyMotion. The method appears to be there on the UIView object.
Simulate ./build/iPhoneSimulator-7.0-Development/iLisp.app
(main)> v = UIView.alloc
=> #<UIView:0xc5b16d0>
(main)> v.methods.sort.select {|m| m.to_s =~ /init.*/}
=> [:init, :"initWithCoder:", :"initWithFrame:", :"initWithSize:", :"initialize_clone:", :"initialize_dup:", :selectionAffinity]
(main)> v.send("initWithFrame:", CGRectMake(10, 10, 100, 100))
dyld: lazy symbol binding failed: Symbol not found: __ZN9RoxorCore14find_bs_structESs
Referenced from: /Library/RubyMotion/data/ios/7.0/iPhoneSimulator/libmacruby-repl.dylib
Expected in: flat namespace
dyld: Symbol not found: __ZN9RoxorCore14find_bs_structESs
Referenced from: /Library/RubyMotion/data/ios/7.0/iPhoneSimulator/libmacruby-repl.dylib
Expected in: flat namespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment