jaPBe: Converting source to PB4

Developed or developing a new product in PureBasic? Tell the world about it.
technicorn
Enthusiast
Enthusiast
Posts: 105
Joined: Wed Jan 18, 2006 7:40 pm
Location: Hamburg

jaPBe: Converting source to PB4

Post by technicorn »

Hi,

I've just started to port the latest sourcecode from gnozal for jaPBe to PB4.
So far it looks promising.
The IDE is already running, there are only some problems with the
compiler, it's not running yet, I get "compiler terminated" and a permanent timeout in the info window.
Hopefully I'll solve this problem today.

BTW: BlitzTools PB-converter helps a lot, without it, it would have taken
days to convert all the sources.
edit: Converter link: http://blitztools.de.vu/
Greatings,
technicorn
Last edited by technicorn on Tue Oct 10, 2006 9:42 am, edited 2 times in total.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

BlitzTools PB-converter
What is that? Is it AL90's converter? I can't find anything called that here or on google.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Please note the jaPBe uses undocumented PB3.9x features like EventwParam() and EventlParam(). I am not sure they work the same way in PB4.00 !
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

EventwParam() and EventlParam() works OK in PB4.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
thamarok
Enthusiast
Enthusiast
Posts: 282
Joined: Wed Sep 06, 2006 1:37 pm

Post by thamarok »

Flype wrote:EventwParam() and EventlParam() works OK in PB4.
That's good. I don't know why they are not documented, but they help much if you don't want to write a lot of API code to get things done.
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

they are not documented because - at the contrary of the PureBasic philosophy - these ones are Windows specifics.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Tipperton
Addict
Addict
Posts: 1286
Joined: Thu Jun 19, 2003 7:55 pm

Post by Tipperton »

Flype wrote:they are not documented because - at the contrary of the PureBasic philosophy - these ones are Windows specifics.
I think they should still be documented somewhere for the benefit of those like me who are only interested in Windows development.
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

Tipperton wrote:
Flype wrote:they are not documented because - at the contrary of the PureBasic philosophy - these ones are Windows specifics.
I think they should still be documented somewhere for the benefit of those like me who are only interested in Windows development.
I agree, could someone tell me what they functions do?
I love Purebasic.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

EventwParam() and EventlParam() are the equivalents to wParam and lParam in a Windows Callback, they allow you to access these values without setting up a callback, which is quite handy.
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

netmaestro wrote:EventwParam() and EventlParam() are the equivalents to wParam and lParam in a Windows Callback, they allow you to access these values without setting up a callback, which is quite handy.
Exactely.


to more precise, here is a small snippet :

Code: Select all

If OpenWindow(0,0,0,640,480,"test",#PB_Window_ScreenCentered)
  
  Repeat
    Select WaitWindowEvent()
      Case #WM_KEYUP
        Select EventwParam()
          Case #VK_RETURN: MessageRequester("", "Hello")
          Case #VK_ESCAPE: Break
        EndSelect
    EndSelect
  ForEver
  
  CloseWindow(0)
  
EndIf
which a simpler way to do this :

Code: Select all

Procedure MyCallback(WindowID, message, wParam, lParam)
  
  Protected result.l = #PB_ProcessPureBasicEvents
  
  Select message
    Case #WM_KEYDOWN
      Select wParam
        Case #VK_RETURN: MessageRequester("", "Hello")
        Case #VK_ESCAPE: SendMessage_(WindowID, #WM_CLOSE, 0, 0)
      EndSelect
  EndSelect
  
  ProcedureReturn result
  
EndProcedure

If OpenWindow(0,0,0,640,480,"test",#PB_Window_ScreenCentered)
  
  SetWindowCallback(@MyCallback())
  
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
  
EndIf
:wink:
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
User avatar
Blue
Addict
Addict
Posts: 966
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: jaPBe: Converting source to PB4

Post by Blue »

technicorn wrote:I've just started to port the latest sourcecode from gnozal for jaPBe to PB4.
Great initiative.

Can we help you in any way, with that ?
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
User avatar
Blue
Addict
Addict
Posts: 966
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Post by Blue »

Flype wrote:[...]
which a simpler way to do this :
:wink:
Er.. Ahh...
It seems to me that your first code snippet was the simpler of the two examples.
No?
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
technicorn
Enthusiast
Enthusiast
Posts: 105
Joined: Wed Jan 18, 2006 7:40 pm
Location: Hamburg

Post by technicorn »

Blue wrote:Great initiative.

Can we help you in any way, with that ?
Many thanks for the offer, but it's already finished, I hope :D .
I'm already make last changes using the converted version!

Hopefully I haven't introduced to many bugs :wink:

@gnozal: If you want to, I can send you the modified sources, I marked all places where I messed with the code with my nick.
I think it will make enhancements you want to incorporate into jaPBe far more easyer.
And could you or someone else host the updated source,
as I don't have webspace to put the files up.

Although the PB-compiler is still somewhat buggy, I hadn't any trouble compiling and running jaPBe for PB-V4

Greatings,
technicorn
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

technicorn wrote:@gnozal: If you want to, I can send you the modified sources, I marked all places where I messed with the code with my nick.
I think it will make enhancements you want to incorporate into jaPBe far more easyer.
And could you or someone else host the updated source, as I don't have webspace to put the files up.
Maybe you could find a place to upload your file so everybody could test your converted jaPBe and see if it's stable.
I suggest PureStorage http://purebasic.myftp.org ; there are also many free web providers.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
technicorn
Enthusiast
Enthusiast
Posts: 105
Joined: Wed Jan 18, 2006 7:40 pm
Location: Hamburg

Post by technicorn »

Ok, here are a short info text, the executable and the new sources:

Info text
Zipped executable
Zipped sources

The unpacked exe is about 1.4 Mb, compared to the about 550 kb of the
PB-V3 compiled exe, but it includes the on error linenumber support.
But even without it, it's still about 1 Mb.

Just download and test.

Edit: Sorry, got wrong links, corrected and tested. Please try again :oops:
Last edited by technicorn on Thu Oct 12, 2006 9:55 pm, edited 1 time in total.
Post Reply