B4J Question How can I add the additional jMsgbox library (or other libraries?

wdegler

Active Member
Licensed User
Longtime User
I wish to add a message box to my b4j program.

I am running B4J with my .b4j program open. I click Tools/Configure Paths and note the Additional libraries entry. I look at the directory indicated there and see two files in it: jMsgboxes.jar and jMsgboxes.xml.

When I try to compile my program with “dim Msgbox as jMsgboxes”, I get the error:

“Unknown type: jmsgboxes Are you missing a library reference?”

How can I add additional libraries that are recognized?


Walter Degler
 

stevel05

Expert
Licensed User
Longtime User
You should be able to see the libraries in the Libs Tab, bottom right of the IDE, Select the library that you want to use.

upload_2014-7-20_16-58-34.png
 
Upvote 0

wdegler

Active Member
Licensed User
Longtime User
You should be able to see the libraries in the Libs Tab, bottom right of the IDE, Select the library that you want to use.

View attachment 26484
Thank you. I did indeed forget to check the box beside the "jMsgboxes (version 1.20)" entry. I have checked it now, saved the program and when I compile again, the same error message appears. Is it possible that some other library needs to be checked for this library to work?

Walter Degler
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
It should be:

B4X:
Dim MsgBox As MsgBoxes

jMsgboxes is the name of the library, it can contain one or multiple classes with different names. The class you want is called MsgBoxes.

In the IDE the error should be apparent as the variable and ObjectName should be colored red.
 
Upvote 0

wdegler

Active Member
Licensed User
Longtime User
It should be:

B4X:
Dim MsgBox As MsgBoxes

jMsgboxes is the name of the library, it can contain one or multiple classes with different names. The class you want is called MsgBoxes.

In the IDE the error should be apparent as the variable and ObjectName should be colored red.
You're exactly right! I made the change and now it works. Thank you for the information.:)
I had to add "jfxtras-labs-2.2-r5.jar" to the Additional libraries folder first, however.
 
Upvote 0

JoseB4

New Member
I download jfxtras-labs-2.2-r5.jar.
Where is jfxtras-labs-2.2-r5.xml ?, and where I can download JMsgBox.jar and .xml??
I am tired to search and I can not found them.
Thanks
Jose
 
Upvote 0
I wish to add a message box to my b4j program.

I am running B4J with my .b4j program open. I click Tools/Configure Paths and note the Additional libraries entry. I look at the directory indicated there and see two files in it: jMsgboxes.jar and jMsgboxes.xml.

When I try to compile my program with “dim Msgbox as jMsgboxes”, I get the error:

“Unknown type: jmsgboxes Are you missing a library reference?”

How can I add additional libraries that are recognized?


Walter Degler


Walter, did you manage to fix this problem on the Lib ? I have the same problem, can not add it to the Libraries. Also i couldn´t find the xml file only found jfxtras-labs-2.2-r5.jar.
 
Upvote 0

TorontoJim

Member
Licensed User
Longtime User
I've been over this a dozen times now and I'm still getting the error that the library isn't loaded.

I've configured the paths, the external libraries folder contains the both of the files above
configpaths.png



I've placed both .jar files in that folder (see extralibraries.png image)
extralibraries.png



But nothing about jMsgboxes is showing up in the libraries
libraries.png




I'm using B4J 4.20 (1). Can anyone please tell me what I'm doing wrong?

This is only my second project with B4J. I've never coded Visual Basic before, my only exposure has been several years of VBA. I may be doing something that is obvious, but it's not obvious to me. Please feel free to use small words :)


Thank you for your time.
 
Upvote 0

TorontoJim

Member
Licensed User
Longtime User
Were I just displaying an alert, I would agree. However, I want to offer a Yes/No prompt. fx.Msgbox doesn't allow me to do that. Does it? Or do I need to create a second form in the project to make my own dialogue?
 
Upvote 0
Top