reflection

  1. TelKel81

    B4J Question How to get the value of a field declared in a code module using Reflection or JavaObject ?

    I tried with both but to no avail... I know how to do it with class modules but the same approach doesn't work in code modules (NoSuchFieldException) despite that I can successfully iterate through the fields of the code module with the getFields method.
  2. TelKel81

    Android Question Initializing the field of a custom type with reflector or javaobject

    For each field (they are all maps) of a custom type, I want to initialize its map. I know I can use JavaObject / Reflection to do it but I can't find out how.
  3. W

    B4J Question AddEventHandler (keypressed) and AddChangeListener (focusProperty) don't work together

    Hi, I have some set of textfields and choiceboxes to multiple enter same data structure (name, surname and goalkeeper yes/no). I want to go to next field by ENTER key - I use AddEventHandler (keypressed), but I must know witch field has focus to continue to the next field (when I get focus by...
  4. M

    Android Question Get Touch Event of a Label

    Hi everyone, i was wondering, there is a way to retrive the _Touch event from a label? Thanks in advance
  5. rleiman

    Android Question [SOLVED] Setting up an on touch listener with the reflection library

    Greetings, Can you check my coding? I'm trying to set up an on touch listener on one of my image views with the reflection library. I can compile the app without errors but when I run the app the logs indicate this error: java.lang.NullPointerException: Attempt to invoke virtual method 'void...
  6. walterf25

    Android Question JavaObject or Reflection Code

    Hi all, does anyone know how to write this code using either JavaObject or Reflection libraries, maybe both are needed? I'm not so good and don't really understand much how to use those two libraries, i've tried several things but none of them work try {...
  7. wonder

    Android Question [SOLVED] Reflection and template argument

    SOLVED: https://www.b4x.com/android/forum/threads/reflection-and-template-argument.106102/#post-664183 Hi! This is a Reflection question, so please read-on even if you're not familiar with LibGDX. With regards to LibGDX, I'm trying to access (with reflection) the "derivativeAt" method of the...
  8. wonder

    Android Question [SOLVED] Check if method exists

    Hi! Since Try/Catch doesn't work with CallSub, is there a way to check if a method exists in a given class (instance)? Edit: Solved! Sub SafeCallSub(class As Object, method As String) As Object If SubExists(class, method) Then Return CallSub(class, method) Return Null End Sub
Top