infinitered / ProMotion-form

Deprecated -- use ProMotion-XLForm
19 stars 11 forks source link

NSUnknownKeyException using property driven example in README #28

Closed ryanlntn closed 9 years ago

ryanlntn commented 9 years ago

I get a Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<FXFormTextFieldCell 0x12909020> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key label.'

Using code derived from the example in the README:

class MyFormScreen < PM::FormScreen
  title "My Form"

  def form_data
    [{
      title: "Account Information",
      footer: "Some help text",
      cells: [{
        key: "email",
        label: "ID",
        type: :email,
        value: "me@example.com",
      }, {
        key: "password",
        label: "New Password",
        type: :password,
        value: "",
      }]
    }]
  end

end

Any ideas?

ryanlntn commented 9 years ago

Commenting out the :label keys resolves the exception.