Author Topic: JAPI 2.0  (Read 11723 times)

Marcus

  • Globaler Moderator
  • Full Member
  • *****
  • Posts: 241
    • View Profile
    • NaaLaa
Re: JAPI 2.0
« Reply #15 on: 26. May 2013, 00:15:39 »
Quote
I did use java a lot for gui programs many years ago, always liked awt better than swing because of the native look.

AWT is ugly like Motif. I see no performance hit using swing. The UI that swing brings to the table is awesome and consistent across the board.

If I wanted beauty I'd stick to naalaa's SimpleWidget and create a sweet theme in GIMP.




But people don't want things that look different.


John

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
Re: JAPI 2.0
« Reply #16 on: 26. May 2013, 00:20:19 »
Quote
But people don't want things that look different.

True. Chris's EZGUI for PowerBASIC battles that issue all the time.


John

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
Re: JAPI 2.0
« Reply #17 on: 26. May 2013, 00:55:05 »
Quote
I did use java a lot for gui programs many years ago,

Marcus,

It would be really helpful if you could compile the JAPI swing Java code and fix the deprecation warnings. I have this bad felling the Java folks made the decision to drop deprecated code support in 64 bit. JAPI swing does weird things or just errors running some of it's demos. If we can get a current swing jar built then adding functionality will be good across the board.

John

Cybermonkey

  • Administrator
  • Hero Member
  • *****
  • Posts: 574
    • View Profile
    • Home of EGSL
Re: JAPI 2.0
« Reply #18 on: 26. May 2013, 11:47:01 »
Does the demos that came with the SBJAPI2_RC1.zip  run? (use the SB JAPI script code as an example)

Both Charles and I were able to use the generic japi.dll with the Mandelbrot example.
No, I am using Freepascal with the japi.pas header. The AWT version works after I changed the J_ to j_ in the header (seems to be case sensitive). Maybe I have to change that back? I tried the examples here: http://userpages.uni-koblenz.de/~evol/japi/examples/p-examples/
Best regards,
Cybermonkey

Cybermonkey

  • Administrator
  • Hero Member
  • *****
  • Posts: 574
    • View Profile
    • Home of EGSL
Re: JAPI 2.0
« Reply #19 on: 26. May 2013, 12:57:25 »
Nope, doesn't work with Freepascal. Only the "older" AWT library does.
Best regards,
Cybermonkey

John

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
Re: JAPI 2.0
« Reply #20 on: 26. May 2013, 17:38:43 »
I know nothing about Pascal so I wouldn't know where to start.

Does the JAPI.jar build and create the byte array include of it?

Cybermonkey

  • Administrator
  • Hero Member
  • *****
  • Posts: 574
    • View Profile
    • Home of EGSL
Re: JAPI 2.0
« Reply #21 on: 26. May 2013, 17:49:54 »
I know nothing about Pascal so I wouldn't know where to start.

Does the JAPI.jar build and create the byte array include of it?
No, I use your pre-made DLL. The one which is attached in the first post does work. The one downloaded from scriptbasic.org does not work. I did'nt build anything myself.
Best regards,
Cybermonkey

John

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
Re: JAPI 2.0
« Reply #22 on: 26. May 2013, 18:50:30 »
ScriptBasic extension modules (.dll) are not in standard DLL format and are specific to SB. I generated a generic version of the japi.dll that works fine with OxygenBasic and DLLC (FFI for SB). I have attached a zip with the japi.dll and japi.h for you to give a try. (swing version) I thought Pascal had it's own special DLL interface. (VCL).

« Last Edit: 26. May 2013, 19:45:17 by ScriptBasic »

Cybermonkey

  • Administrator
  • Hero Member
  • *****
  • Posts: 574
    • View Profile
    • Home of EGSL
Re: JAPI 2.0
« Reply #23 on: 26. May 2013, 19:18:01 »
ScriptBasic extension modules (.dll) are not in standard DLL format and are specific to SB. I generated a generic version of the japi.dll that works fine with OxygenBasic and DLLC (FFI for SB). I have attached a zip with the japi.dll and japi.h for you to give a try. (swing version) I thought Pascal had it's own special DLL interface as well.
Ah, thanks, I will try that later. And, no, Freepascal can use regular C/C++ DLLs (also Delphi so far as I know ...).
Best regards,
Cybermonkey

John

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
Re: JAPI 2.0
« Reply #24 on: 26. May 2013, 19:43:42 »
If you can use win32 DLLs with a cdecl calling format, you should be set to go and be able to run all your JAPI Pascal examples.

Cybermonkey

  • Administrator
  • Hero Member
  • *****
  • Posts: 574
    • View Profile
    • Home of EGSL
Re: JAPI 2.0
« Reply #25 on: 26. May 2013, 22:09:18 »
ScriptBasic extension modules (.dll) are not in standard DLL format and are specific to SB. I generated a generic version of the japi.dll that works fine with OxygenBasic and DLLC (FFI for SB). I have attached a zip with the japi.dll and japi.h for you to give a try. (swing version) I thought Pascal had it's own special DLL interface. (VCL).
But that's the same as in the first post. No SWING, just AWT ...  :(
Could you provide a cdecl format dll with SWING support?
Best regards,
Cybermonkey

John

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
Re: JAPI 2.0
« Reply #26 on: 26. May 2013, 22:17:23 »
The japi.dll I posted was built with the swing directory and works fine with ScriptBasic and OxygenBasic and anything else for that matter that can load a win32 DLL.

Can you post a screenshot of the choice.pas example? You should see a Windows like themed listbox with a Windows like scrollbar.

Can you try the ScriptBasic or O2 version and see what it looks like?

Does your screen look anything like the ones I posted on ScriptBasic for Windows?
« Last Edit: 26. May 2013, 22:20:54 by ScriptBasic »

Cybermonkey

  • Administrator
  • Hero Member
  • *****
  • Posts: 574
    • View Profile
    • Home of EGSL
Re: JAPI 2.0
« Reply #27 on: 26. May 2013, 22:56:32 »
Okay, here's the screenshot. Both DLLs are exactly the same in size: 197 kb. The Scirba DLL was slightly larger (about 250 kb).
Best regards,
Cybermonkey

John

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
Re: JAPI 2.0
« Reply #28 on: 26. May 2013, 23:12:14 »
That's what its suppose to look like. It's working as a swing JAPI dll. The AWT version wouldn't show the Windows like drop down button.

Why do you think this is the AWT version? Try running the 2003 binary from the JAPI site and you will notice the difference.

P.S.

Making someone log in to see an attachment should be change to guset access. IMHO


Cybermonkey

  • Administrator
  • Hero Member
  • *****
  • Posts: 574
    • View Profile
    • Home of EGSL
Re: JAPI 2.0
« Reply #29 on: 26. May 2013, 23:24:54 »
Because the buttons look flat like on Windows 95. With SWING the buttons IMHO are like in the above screenshot from your page (shrink button).
And because it is totally the same. I just downloaded the original DLL from japi.de and the choice.pas looks absolutely the same.
First screenshot is the SWING version, second the AWT version, so where is the difference?
Best regards,
Cybermonkey