Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

editor of samples make table view item click disable #38

Open
charlescui opened this issue Aug 7, 2013 · 0 comments
Open

editor of samples make table view item click disable #38

charlescui opened this issue Aug 7, 2013 · 0 comments

Comments

@charlescui
Copy link

I think this code occur error:eval script._UTF8String.to_s.
After click Run button in Editor view, nothing will eval.But return to root table view, every table item is diabled for click.

I changed editor.rb file's runScript function:

  define C::Void, :runScript, Cocoa::Object do |sender|
    # script = @editor_view._text._UTF8String.to_s    
    # str = eval(script._UTF8String.to_s)
    str = eval("1 + 1")
    alert = Cocoa::UIAlertView._alloc._initWithTitle "Hello",
      :message, (str || "I am MobiRuby"),
      :delegate, nil,
      :cancelButtonTitle, "I know!",
      :otherButtonTitles, _S("What's?"), nil
    alert._show
  end

If delete the code eval line, app run ok in ios simulator 6.1,else table view will disabled after Editor's Run button is clicked.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant