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

editor of samples make table view item click disable #38

@charlescui

Description

@charlescui

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions