B4J Tutorial B4J HowTo's

Discussion in 'B4J Tutorials' started by rwblinn, Jan 3, 2014.

  1. Antonio1

    Antonio1 Member Licensed User

    Ciao Rob

    Grazie...
     
  2. fredo

    fredo Active Member Licensed User

    Moin Rob,
    great collection of information you created there. Thank you!

    I'm new to B4J and just installed the environment.

    I've tried a few howto's and it's flawless to work with and good to understand!

    One Question:

    - HowTo #15 throws an error "Property "stylesheets" does not exist or is read-only" (see log below)

    - File "project.css" is in the files-folder

    Could it be that I forgot to set something up?

    Best regards,
    fredo


    Code:
    Program started.
    B4JHowToSQLite v20140629
    Error occurred on line: 
    65 (main).
    com.sun.javafx.fxml.PropertyNotFoundException: Property 
    "stylesheets" does not exist or is read-only.
        at com.sun.javafx.fxml.BeanAdapter.put(BeanAdapter.java:
    423)
        at com.sun.javafx.fxml.BeanAdapter.put(BeanAdapter.java:
    37)
        at javafx.fxml.FXMLLoader$Element.applyProperty(FXMLLoader.java:
    464)
        at javafx.fxml.FXMLLoader$Element.processPropertyAttribute(FXMLLoader.java:
    287)
        at javafx.fxml.FXMLLoader$Element.processInstancePropertyAttributes(FXMLLoader.java:
    195)
        at javafx.fxml.FXMLLoader$ValueElement.processEndElement(FXMLLoader.java:
    586)
        at javafx.fxml.FXMLLoader.processEndElement(FXMLLoader.java:
    2430)
        at javafx.fxml.FXMLLoader.load(FXMLLoader.java:
    2136)
        at anywheresoftware.b4j.objects.PaneWrapper.LoadLayout(PaneWrapper.java:
    134)
        at b4j.example.main._appstart(main.java:
    171)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
    57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
    43)
        at java.lang.reflect.Method.invoke(Method.java:
    601)
        at anywheresoftware.b4a.shell.Shell.runMethod(
    Shell.java:563)
        at anywheresoftware.b4a.shell.Shell.raiseEventImpl(
    Shell.java:224)
        at anywheresoftware.b4a.shell.Shell.raiseEvent(
    Shell.java:156)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
    57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
    43)
        at java.lang.reflect.Method.invoke(Method.java:
    601)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:
    93)
        at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:
    82)
        at anywheresoftware.b4a.BA.raiseEvent(BA.java:
    84)
        at b4j.example.main.start(main.java:
    35)
        at com.sun.javafx.application.LauncherImpl$
    5.run(LauncherImpl.java:319)
        at com.sun.javafx.application.PlatformImpl$
    5.run(PlatformImpl.java:215)
        at com.sun.javafx.application.PlatformImpl$
    4$1.run(PlatformImpl.java:179)
        at com.sun.javafx.application.PlatformImpl$
    4$1.run(PlatformImpl.java:176)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl$
    4.run(PlatformImpl.java:176)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.access$
    100(WinApplication.java:29)
        at com.sun.glass.ui.win.WinApplication$
    3$1.run(WinApplication.java:73)
        at java.lang.Thread.run(
    Thread.java:722)
     
  3. rwblinn

    rwblinn Well-Known Member Licensed User

    Hi Fredo,

    to go for sure have downloaded this howto and executed without any issues. This app has been developed using JDK 8 and JavaFX 2. Found in several threads, that when using JDK 7 this error occurs when an app has been developed using JDK 8. It is fixed when upgrading to JDK 8.
    Pls verify which JDK version you use?

    Thanks for your feedback - as always encouraging to continue.
     
  4. fredo

    fredo Active Member Licensed User

    I've just installed JDK 8 and now it works perfectly.

    Thanks for the hint, Rob
     
  5. B4JExplorer

    B4JExplorer Active Member Licensed User

    Robert,

    Sorry, but I don't see the dbdrivermsaccess.zip file in the XML-based version 1, or the Sqlite-based version 2.

    When compiling version 1, it complains about this line:


    gDlg.ShowMessage2(strMsg, strHdg, gDlg.MSGTYPE_INFORMATION)


    , an unknown member error.

    jRLStringPlus, jRLWinBatteryInfo, jrlmsgdialogs, and jrlini from your site, have all been installed in libraries.



    When compiling the offline version 2 reader,

    it complains about a missing jna-3.5.1.jar. A google search for 'b4j jna-3.5.1.jar', indicates that it's referenced on your BatteryInfo page http://www.rwblinn.de/142k1t43.htm, but when you link to that page, it isn't there.

    The latest jna is available on github, but I don't think it has the wrapper and xml that's required by B4J.
     
  6. rwblinn

    rwblinn Well-Known Member Licensed User

    Hi,

    thanks for feedback. Pls find my reply:

    The dbdrivermsaccess.zip file is included in B4J HOWTO Example project Nr. 12 (I have checked again)
    12. Open and load MS Access Database records
    http://www.rwblinn.de/b4j/b4jhowto/examples/b4jhowtomsaccess.zip
    The B4J HOWTO Offline Readers do not require jna-3.5.1.jar. You can check this by reviewing the project attributes as defined in the b4j files.
    For version 1, if you receive an error for the Message Dialog, you might have the wrong version of the jRLMsgDialogs Library. Ensure to use version 1.14, which is attached.

    The Battery Info Library uses jna 4.1.0 as referenced in the readme.txt:
    http://www.rwblinn.de/b4j/opensource/jrlwinbatteryinfo.zip
    You do not need a wrapper for B4J - ensure to include the additional jna library in the project attributes.

    Good Luck further in Exploring B4J...
     

    Attached Files:

  7. B4JExplorer

    B4JExplorer Active Member Licensed User

    rwblinn,

    Sorry, I didn't see your reply until now. Thanks, will check it out today.
     
  8. Mark Zraik

    Mark Zraik Member Licensed User

    Thank you so much for your hard work!
    Mark
     
    rwblinn and Erel like this.
  9. rbsoft

    rbsoft Active Member Licensed User

    Excellent work. Extremely helpful.
    Thank you very much.

    Rolf
     
    Mark Turney and rwblinn like this.
  10. Ju Yang

    Ju Yang Active Member Licensed User

    Really great job, thanks very much.
     
    Mark Turney and rwblinn like this.
  11. rwblinn

    rwblinn Well-Known Member Licensed User

    B4J HowTos Updated Dec 24, 2015: Read Whats New first. Total 834 HowTos, 107 Examples.
     
  12. Roger Daley

    Roger Daley Well-Known Member Licensed User

    Hi Rob,

    Your "HowTo's" has become my first reference in B4J queries. Thanks heaps.

    Regards Roger
     
    DonManfred and rwblinn like this.
  13. rwblinn

    rwblinn Well-Known Member Licensed User

    B4J HowTos Updated Jan 31, 2016: Read Whats New first. Total 888 HowTos, 107 Examples.

    (just a side remark)
    Got this month (unexpected) involved in various B4A app developments - it is great to see how code can be reused between B4A <> B4J, but also how fast apps (esp prototypes) can be developed using B4A = real RAD comes true here.
     
    ellpopeb4a, Erel, lemonisdead and 2 others like this.
  14. rwblinn

    rwblinn Well-Known Member Licensed User

    B4J HowTos Updated Feb 24, 2016: Read Whats New first. Total 944 HowTos, 114 Examples.

    Getting close to 1111101000...:)
     
  15. rwblinn

    rwblinn Well-Known Member Licensed User

    B4J HowTos Updated Mar 30, 2016: Read Whats New first. Total 1000 HowTos, 126 Sample Projects.

    Notes
    In progress of redesigning my homepage using w3.css. The B4J HowTos are also available in w3.css responsive format: Select B4X > B4J HowTos.
    Have tested the usage of my homepage on various mobile devices. Results look promising so far.
     
  16. B4JExplorer

    B4JExplorer Active Member Licensed User

    Hi Robert,

    I tried compiling version 1, and received the

    Error description: Unknown type: jrlmsgdialogs

    error.

    Then, when Compiling to Library the jRLDialogs class at http://www.rwblinn.de/142k1t40.htm,

    the error

    Error description: Access to the path 'C:\Software\Freeware\B4J\jRLDialogs\Objects\src\b4j\example' is denied

    occurs.

    After creating the b4j/example folder in the jRLDialogs class and copying it to the B4J Libraries folder, and closing & restarting the project, the original error that


    Error description: Unknown type: jrlmsgdialogs

    still occurs. jrlmsgdialogs is checked off, in the libraries form.
     

    Attached Files:

  17. rwblinn

    rwblinn Well-Known Member Licensed User

    Hi,

    based on your request, took following steps to verify:
    1) Downloaded B4J: Version 1 for Windows (XML DB)..
    2) The zip file contains the library jRLMsgDialogs v1.10. Copied jRLMsgDialogs.jar and jRLMsgDialogs.xml to the B4J Additional Libraries Folder.
    3) Opened B4JHowTo.b4j in the B4J IDE (B4J v4.20 (1).
    4) Verified the jRLMsgDialogs library in the B4J IDE list. Result version 1.1 listed and checked.
    5) Compiled and run B4JHowTo v1 without issues.

    Could you please check if the steps 1 - 5 will work in your environment.

    Appreciated.
     
    B4JExplorer likes this.
  18. B4JExplorer

    B4JExplorer Active Member Licensed User

    The version may be the problem.

    http://www.rwblinn.de/142k1t40.htm apparently contains version 1, rather than 1.1. The compilation works, only if gDlg as jRLDialogs, rather than jRLMsgDialogs.

    I'll search around for the 1.1 version, and try again.


    One interesting quirk, after compiling and testing this, is that my other non-ui apps won't compile now, unless an ../Objects/src/b4j folder is defined.
     
  19. B4JExplorer

    B4JExplorer Active Member Licensed User

    rwblinn likes this.
  20. rwblinn

    rwblinn Well-Known Member Licensed User

    B4J HowTos Updated Jun 21, 2016: Read News first. Total 1052 HowTos, 136 Examples.

    Notes
    Slowed down a bit in developing new B4J HowTos as been focussing on the new B4R development tool - for which I developed in the mean time 31 sample experiments (go here, select B4X > B4R > Arduino or ESP8266). Some of the B4R experiments show the integration between B4R and B4J - one of the great B4X power features.
     
    Last edited: Jul 6, 2016
    Ferbis, B4JExplorer, Cableguy and 7 others like this.
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