Re: [codenameone-discussions] Re: Passing a reference of a NativeInterface instance as parametter of another NativeInterface method?

2018-10-19 Thread Thomas
Thanks Steeve. I already use a lookup static map as a solution to my problem. This is just that the possibility to pass a NativeInterface instance as a NativeInterface parameter (and forth, as a callback result) would have been cleaner as I wouldn't have to maintain this static map in parallel

Re: [codenameone-discussions] Re: Passing a reference of a NativeInterface instance as parametter of another NativeInterface method?

2018-10-19 Thread Steve Hannah
If you can provide more information about your use case, I may be able to suggest a way to achieve it. While you can't just pass a NativeInterface instance as a NativeInterface parameters, there are a few crafty techniques that you can use to pass "native" objects back and forth. E.g., on iOS,

[codenameone-discussions] Re: Passing a reference of a NativeInterface instance as parametter of another NativeInterface method?

2018-10-18 Thread Thomas
OK Thanks. As for the ByteBuffer I completely agree yes ;) (It is the basis of the binary messages solution chosen by Flutter to communicate between flutter dart code and native one and it is SO convenient and powerfull to work with that I also regret not having such an easy solution in CN1

[codenameone-discussions] Re: Passing a reference of a NativeInterface instance as parametter of another NativeInterface method?

2018-10-18 Thread Shai Almog
It hasn't been implemented, it would have been nice but it's a lot of work since every change in this part of the code needs to be done for every port. It also needs to be replicated in the code generation and the backend generation logic. There are multiple points of failure and pain so we try