Solving the warning
368433 opened this issue · 4 comments
Hello,
Thank you for the SplitRow code. I get an xcode warning (acknowledged in the code):
Cast from 'RowOf<SplitRowValue<L.Cell.Value, R.Cell.Value>>!' to unrelated type '_SplitRow<L, R>' always fails
Is there a way to solve this warning as it is distracting and it is harder to tell if there are other warnings that deserve our attention.
Thanks
This warning is a compiler issue as the casting obviously works. I am not sure if a radar has been filed with Apple.
I don't think we can work around casting the row.
Hi, how it's posible the same SplitRow but with three elements? maybe like left, center and right. I need some like this:
Quantity | Description | Type in same row
Thanks
@pilloom using three rows is not supported by SplitRow. I suggest to build your own custom row specific to your use case. For this, please have a look at the Eureka custom row documentation.
In addition, having a look at the already existing custom rows with multiple input fields serving a specific purpose may jump start your development (e.g.: CreditCardRow or PostalAddressRow).
Good luck!
the warning is correct, surely you just need to rewrite the line to say something like
`
let row = cast_nice(row: self.row)
func cast_nice(row: RowOf<SplitRowValue<L.Cell.Value, R.Cell.Value>>) -> _SplitRow<L, R>{
//Cast from 'RowOf<SplitRowValue<L.Cell.Value, R.Cell.Value>>?' to unrelated type '_SplitRow<L, R>' always fails
// then something like (from here on in I am making this up)
let rtn : _SplitRow<L, R> = _SplitRow<L, R>()
rtn.setL = row.L
rtn.setR = row.R
return rtn
}
`