Android Question b4a lib from within b4a

Discussion in 'Android Questions' started by Cableguy, Jan 29, 2015.

  1. Cableguy

    Cableguy Expert Licensed User

    Take as an example the Web view ...
    the Web view itself is initialized in the usual way... then with the help of Web view extras we can enhance the basic webview we just initialized...

    I want to do the same with a helper view ... my issue is...
    my "webview" is a wrapper created in the b4a ide using compile to lib...
    my wrapper initializes an object... and I need to access that object from a helper lib...
    is there anything specific that needs to be done for this to work?
  2. thedesolatesoul

    thedesolatesoul Expert Licensed User

    Why dont you just expose the WebView from its wrapper?

    In your B4A Webview wrapper library class code:
    Sub AsWebView as WebView
    Return InternalWebview
    End Sub
    Peter Simpson likes this.
  3. Cableguy

    Cableguy Expert Licensed User

    I used the Web view just as an example...
    I am targeting the IOIO lib in my real project... I have a main lib that initializes the IOIO lib and will then prepare the ground for the rest of my app... what I aim to accomplish is to be able of calling/targeting the same instance of the IOIO that was initialized with my main lib (not the IOIO lib itself)

    [EDIT] I didn't notice the snippet was to my wrapper... I will give it a try later on.
  4. thedesolatesoul

    thedesolatesoul Expert Licensed User

    Well the concept is the same. Your wrapper needs to expose/return the objects that you want to use elsewhere.
    Cableguy likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice