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

x/mobile/bind: support slices of supported structs #13445

Open
scisci opened this issue Dec 1, 2015 · 22 comments

Comments

@scisci
Copy link

commented Dec 1, 2015

Just want to know if it will ever be possible to support slices of supported. I currently have to write a wrapper object around an array to pass it back and forth between IOS and Go.

@bradfitz

This comment has been minimized.

Copy link
Member

commented Dec 2, 2015

@hyangah

This comment has been minimized.

Copy link
Contributor

commented Dec 3, 2015

It will not be impossible and eventually it should be supported. I don't know anyone who's currently working on this problem.

@hyangah hyangah changed the title x/mobile/cmd/gomobile: support slices of supported structs x/mobile/bind: support slices of supported structs Dec 3, 2015

@hyangah hyangah added this to the Unreleased milestone Dec 3, 2015

@dcu

This comment has been minimized.

Copy link

commented Jan 5, 2016

yeah this is the most frustrating issue for me right now

@weitzj

This comment has been minimized.

Copy link

commented Jan 13, 2016

Do you have any ideas when this will be done? What I could do?

I tried and failed using: https://golang.org/pkg/container/list/ as an alternative

@ioArchman

This comment has been minimized.

Copy link

commented Jan 21, 2016

+1
Would highly recommend this as currently falling short without this.

@mpiannucci

This comment has been minimized.

Copy link

commented Jan 21, 2016

This is stopping me from using gomobile in anything worthwhile at the moment

@ioArchman

This comment has been minimized.

Copy link

commented Jan 21, 2016

@scisci - If you don't mind can you please share across a gist on how you handle the problem currently as said? My requirement would be to return an array/slice of custom modal class objects with 4 string properties.

@scisci

This comment has been minimized.

Copy link
Author

commented Jan 21, 2016

hi @ioArchman, I made a quick repo here:

https://github.com/scisci/go-mobile-collection

If you think it can work for you, you will probably want to fork it and modify the render.go function to add/remove the methods you want on your collection wrapper. Feel free to make a comment on the project if you have any questions. Its pretty directly adapted from another tutorial on go generics, which you can find here http://www.onebigfluke.com/2014/12/generic-programming-go-generate.html

Keep in mind, I don't consider this a good solution. It feels hacky working with a wrapper on the objective-c/swift side, but it does work. Really would prefer something that feels more natural.

@ioArchman

This comment has been minimized.

Copy link

commented Jan 22, 2016

Thanks @scisci. Will look into this and try utilizing for now. Agreed on your last point too.

@scisci

This comment has been minimized.

Copy link
Author

commented Jan 26, 2016

hi @hyangah, do you have any hints on how this would be technically implemented in case someone wanted to attempt it from outside the gomobile team?

@anacrolix

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2016

👍

@anacrolix

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2016

This is very limiting.

@kmcrawford

This comment has been minimized.

Copy link

commented Feb 14, 2017

Is this still on the road map? I found this library and would like to use it, but this issue may be keep me from using gomobile.

@gopherbot gopherbot added the mobile label Jul 20, 2017

@kliron

This comment has been minimized.

Copy link

commented Jan 5, 2018

It seems this is a show-stopper for many people. Are there any plans to support this?

@4h0q

This comment has been minimized.

Copy link

commented Jun 29, 2018

What's the status of this issue? It has been around for quite a while. It looks like the main show stopper for many people.

CC: @hyangah @crawshaw

@dradtke

This comment has been minimized.

Copy link

commented Sep 14, 2018

I just ran into this, and it would be great to be able to support slices.

@saurabha5

This comment has been minimized.

@nhatlee

This comment has been minimized.

Copy link

commented Oct 26, 2018

have any update for this issue?

@gituser9

This comment has been minimized.

Copy link

commented May 2, 2019

Will there be any news?

@hyangah

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

Currently no one is working on the x/mobile project and adding this feature is not a small project.

Not ideal but need to work around by writing a wrapper package for binding, or using what @scisci mentioned for now.

@gituser9

This comment has been minimized.

Copy link

commented May 3, 2019

Does the project have a future?

@bradfitz

This comment has been minimized.

Copy link
Member

commented May 3, 2019

It's community supported at this point, so its future depends on you. There are others from the community working on it, but not full time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.