Java Question Unknown member in my first lib

Discussion in 'Libraries developers questions' started by kepler, Mar 15, 2015.

  1. kepler

    kepler Active Member Licensed User

    Hi,

    I've just made my first library in Eclipse. I'm testing it.
    The xml and the jar files were properly compiled, I think. The functions are described in the xml file. And the B4a Object Browser software detects them.

    I referenced the lib in the Libs tab - where it appears, and dimensioned in Sub Process_Globals like:

    Dim fl As AlmagestLib

    BUT, when I try to put a variable, like temp (already dimensioned as double), using any of the functions, nothing appears...
    If I just make a forced type fl.function1 it gives the Unknown member message.

    In Eclipse, I referenced the android.jar, and the B4A jars.

    Any tip where to start looking for the error?

    Kind regards,

    Kepler
     
  2. giga

    giga Well-Known Member Licensed User

    "If I just make a forced type fl.function1 it gives the Unknown member message"

    Unknown member sounds like it does not see the "public" methods in your library.

    How many publics do you have? Can you see any of them?
     
  3. kepler

    kepler Active Member Licensed User

    I have 3 public methods in my Java library in Eclipse. They are declared in the produced xml file....
    I don't understand :confused:

    Oh, by the way, I was just testing a little lib in B4A - I'm making one, just in case. Everything was smooth until it told me that the main module/class/or whatever name can't have extra defined functions, in order to be compiled as library. So I made a code module with those routines.
    Now, the main doesn't recognize the functions when I try to test them before I compile as library...

    Today, is not my day...

    Kepler
     
  4. kepler

    kepler Active Member Licensed User

    Ok - found the problem in B4A.
    If we have routine Function1 we must call it like Module1.Function1, if the module's name is Module1. Same as for the variables.

    As for the Eclipse lib, the problem stands...

    Kepler
     
  5. giga

    giga Well-Known Member Licensed User

    When you Dim fl As AlmagestLib, Do you see all your public methods now?
     
  6. kepler

    kepler Active Member Licensed User

    With the new lib made in b4a yes - they automatically appear.
    In the java Eclipse lib in the b4a environment, they don't...

    Kepler
     
Loading...
  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