bmichotte / ProMotion-XLForm

ProMotion-XLForm is a ProMotion plugin for XLForm
MIT License
20 stars 21 forks source link

on_change: allows row paramter to be passed in callback #31

Closed dam13n closed 8 years ago

dam13n commented 8 years ago

Let me know about any improvements to make.

dam13n commented 8 years ago

Please hold on this. I messed it up.

bmichotte commented 8 years ago

I don't have any idea on more improvement... except maybe callback.call if arity == 0 ? So I you want to add it, do it, otherwise, I'll merge like this

dam13n commented 8 years ago

Ok, I added your change. I can't get specs to pass due to an error with: XLFormRowDescriptorTypeImage

2015-12-21 14:42:05.738 ProMotion-XLForm[20962:176541] xl_form.rb:82:in `row_type:': uninitialized constant ProMotion::XLForm::XLFormRowDescriptorTypeImage (NameError)
    from xl_form_cell_builder.rb:16:in `create_cell:'
    from xl_form_section_builder.rb:33:in `block in create_section:'
    from xl_form_section_builder.rb:32:in `create_section:'
    from xl_form.rb:21:in `block in build'
    from xl_form.rb:20:in `build'
    from xl_form_screen.rb:64:in `update_form_data'
    from xl_form_screen.rb:10:in `viewDidLoad'
2015-12-21 14:42:05.744 ProMotion-XLForm[20962:176541] *** Terminating app due to uncaught exception 'NameError', reason: 'xl_form.rb:82:in `row_type:': uninitialized constant ProMotion::XLForm::XLFormRowDescriptorTypeImage (NameError)
    from xl_form_cell_builder.rb:16:in `create_cell:'
    from xl_form_section_builder.rb:33:in `block in create_section:'
    from xl_form_section_builder.rb:32:in `create_section:'
    from xl_form.rb:21:in `block in build'
    from xl_form.rb:20:in `build'
    from xl_form_screen.rb:64:in `update_form_data'
    from xl_form_screen.rb:10:in `viewDidLoad'
bmichotte commented 8 years ago

I removed the image cell from PM-XLForm because I PR it in XLForm and it was accepted, did you ran rake pod:update ? (btw, the specs are passing on travis)

dam13n commented 8 years ago

Yea, I tried updating the pod and cleaning. Using the latest from XLForm. No idea atm.

bmichotte commented 8 years ago

Thanks @dam13n

For your error, do you use the master version or the release ?