FXForms icon indicating copy to clipboard operation
FXForms copied to clipboard

reloadData + valueForKeyPath

Open Julioacarrettoni opened this issue 9 years ago • 0 comments

This PR fixes 2 things:

  1. When assigning a new form to a formController or reassigning the existing one the content doesn't refresh, so a "reloadData" was added just after the form is assigned.

  2. When dealing with "multiple choice" fields the app was crashing due to the fact that "valueForKey" was returning the "value" instead of the "field" object inside FXFormOption. Using "valueForKeyPath" and changing the current overriding of "valueForKey" to "valueForUndefinedKey" seems to fix this issue. To reproduce the issue just run the "BasicExample" with the current form, go to Register and select Gender.

Julioacarrettoni avatar May 28 '15 13:05 Julioacarrettoni