Author Topic: JAPI 2.0  (Read 32575 times)

Mopz

  • Guest
Re: JAPI 2.0
« Reply #15 on: May 25, 2013, 10:15:39 PM »
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.


ScriptBasic

  • Guest
Re: JAPI 2.0
« Reply #16 on: May 25, 2013, 10:20:19 PM »
Quote
But people don't want things that look different.

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


ScriptBasic

  • Guest
Re: JAPI 2.0
« Reply #17 on: May 25, 2013, 10:55:05 PM »
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
  • *****
  • Posts: 0
Re: JAPI 2.0
« Reply #18 on: May 26, 2013, 09:47:01 AM »
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/

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: JAPI 2.0
« Reply #19 on: May 26, 2013, 10:57:25 AM »
Nope, doesn't work with Freepascal. Only the "older" AWT library does.

ScriptBasic

  • Guest
Re: JAPI 2.0
« Reply #20 on: May 26, 2013, 03:38:43 PM »
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
  • *****
  • Posts: 0
Re: JAPI 2.0
« Reply #21 on: May 26, 2013, 03:49:54 PM »
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.

ScriptBasic

  • Guest
Re: JAPI 2.0
« Reply #22 on: May 26, 2013, 04:50:30 PM »
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: May 26, 2013, 05:45:17 PM by ScriptBasic »

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: JAPI 2.0
« Reply #23 on: May 26, 2013, 05:18:01 PM »
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 ...).

ScriptBasic

  • Guest
Re: JAPI 2.0
« Reply #24 on: May 26, 2013, 05:43:42 PM »
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
  • *****
  • Posts: 0
Re: JAPI 2.0
« Reply #25 on: May 26, 2013, 08:09:18 PM »
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?

ScriptBasic

  • Guest
Re: JAPI 2.0
« Reply #26 on: May 26, 2013, 08:17:23 PM »
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: May 26, 2013, 08:20:54 PM by ScriptBasic »

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: JAPI 2.0
« Reply #27 on: May 26, 2013, 08:56:32 PM »
Okay, here's the screenshot. Both DLLs are exactly the same in size: 197 kb. The Scirba DLL was slightly larger (about 250 kb).

ScriptBasic

  • Guest
Re: JAPI 2.0
« Reply #28 on: May 26, 2013, 09:12:14 PM »
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
  • *****
  • Posts: 0
Re: JAPI 2.0
« Reply #29 on: May 26, 2013, 09:24:54 PM »
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?