Bug? JavaObject and Null parameter

stevel05

Expert
Licensed User
Longtime User
While tracking down issues with my previous post to do with UnmodifiableListSet I solved the issue by creating a library. The final library was so simple I went back to try to find out why it wouldn't work with a JavaObject.

The Object in question UnmodifiableListSet has two toArray methods (see docs here) one requires an Object[] array and the other requires no parameter.

Once I found the documentation I got it working with JavaObject by passing an Object array of size 0.

The method that requires no parameter always gives a null pointer error (although it works perfectly in the java library).

Is it possible that the JavaObject lib is confusing the two methods and passing null to the method that requires an object array? Or have I totally missed the mark?

Example app attached.
 

Attachments

  • NPB1-1.zip
    13.6 KB · Views: 354
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
Fixed for the next update:

SS-2013-11-24_11.19.17.png
 

agraham

Expert
Licensed User
Longtime User
This is probably a stupid question but rather than waste my time displaying my stupidity to only myself while trying to figure it out I'll ask instead!

In this demo by what mechanism does the Tag (UserData) property of a Node get set from the name of the StyleClass? :confused: Is it a JavaFX thing?
 

stevel05

Expert
Licensed User
Longtime User
It's done in the subroutine SLUtils.ExtractTags(MainForm.RootPane). I was going to use the style field, but realized that I may want to set colours for some objects, then I realized that a dummy StyleClass won't do any harm as you have to specifically refer to it for it to do anything.
 
Top