Android Question obtain a value from CallSub

Discussion in 'Android Questions' started by Roberto P., Jan 19, 2015.

  1. Roberto P.

    Roberto P. Well-Known Member Licensed User

    good Morning
    how do I get me to return a value from an object with the function CallSub?

    For example, an object has a function that returns a string: Sub GetName as string

    How do I get me the string to a CallSub? If callsub does not allow it, as I think, there is another way to achieve the same result by having different classes?

    Thank You
    greetings
     
  2. derez

    derez Expert Licensed User

    In Treeview I do this by a public variable in the class globals (specifically - a list) which the main module fills with data after being caled by callsub.
     
  3. Roberto P.

    Roberto P. Well-Known Member Licensed User

    Not a treeview, but custom controls.
    thanks
     
  4. Roberto P.

    Roberto P. Well-Known Member Licensed User

    I found that callsub can also return a value:

    dim sField as string

    If SubExists(obj, "getField") Then

    sField = CallSub(obj, "getField")


    end if
     
  5. Peter Simpson

    Peter Simpson Expert Licensed User

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