Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solving the warning #15

Open
368433 opened this issue Apr 19, 2018 · 4 comments
Open

Solving the warning #15

368433 opened this issue Apr 19, 2018 · 4 comments

Comments

@368433
Copy link

368433 commented Apr 19, 2018

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

@mats-claassen
Copy link
Member

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.

@pilloom
Copy link

pilloom commented Feb 18, 2019

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

@marbetschar
Copy link
Collaborator

marbetschar commented Feb 18, 2019

@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!

@Coners
Copy link

Coners commented Jun 25, 2019

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
}		
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants