jaPBe 3.13.4 [IDE for PB 4 and PB 5]
Moderator: gnozal
this might be a PB bug, more than a jaPBe bug (?)
See the bug report here :
http://www.purebasic.fr/english/viewtopic.php?t=24429
See the bug report here :
http://www.purebasic.fr/english/viewtopic.php?t=24429
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
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
@ dobro
Sorry, I can't reproduce the problem.
I tried this :
Open jaPBe
Create new tab (1)
Paste your code
Find 'bmp' (Min/Maj checked) : works ok
Create new tab (2)
Paste your code
Find 'bmp' : works ok in both tabs
Do you use some codepage <> 0 ?
@ nicolaus & dige
It seems to be a PB problem. jaPBe only calls the (external) debugger, PB does the rest.
Sorry, I can't reproduce the problem.
I tried this :
Open jaPBe
Create new tab (1)
Paste your code
Find 'bmp' (Min/Maj checked) : works ok
Create new tab (2)
Paste your code
Find 'bmp' : works ok in both tabs
Do you use some codepage <> 0 ?
@ nicolaus & dige
It seems to be a PB problem. jaPBe only calls the (external) debugger, PB does the rest.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Hello gnozal,
Just 2 small things :
1/
If we switch On or Off the "Inline ASM" in the compiler options, then the ASM lines are not automatically colored/uncolored.
You can try with this ASM sample for example :
2/
In the compiler option panel, Is it possible to add an easy way to specify a default icon for the generated excutable.
jaPBe could provide a default purebasic icon, this could be useful for lazy programmer or for quick'n'dirty executables.
Just 2 small things :
1/
If we switch On or Off the "Inline ASM" in the compiler options, then the ASM lines are not automatically colored/uncolored.
You can try with this ASM sample for example :
Code: Select all
var.l
bug.l
MOV eax,var ;as workaround use !mov eax,[v_var] instead
ADD eax,1
MOV bug,eax
MOV var,eax
MessageRequester("value", Str(bug))
End
In the compiler option panel, Is it possible to add an easy way to specify a default icon for the generated excutable.
jaPBe could provide a default purebasic icon, this could be useful for lazy programmer or for quick'n'dirty executables.
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
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
They are, but the display is not updated (move the carret with the up/down keys, you will see the change). Fixed.Flype wrote:1/ If we switch On or Off the "Inline ASM" in the compiler options, then the ASM lines are not automatically colored/uncolored.
Yes, it could be handy. I am lazy tooFlype wrote:2/ In the compiler option panel, Is it possible to add an easy way to specify a default icon for the generated excutable.
jaPBe could provide a default purebasic icon, this could be useful for lazy programmer or for quick'n'dirty executables.

For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
@gnozal
I hafe found a prob in jaPBE with this code.
In the orgnial IDE i can compiled this but in jaPBe a hafe a ASM error.
Settings in jaPBe and orginal IDE:
ASM: on
OnError: on
I hafe found a prob in jaPBE with this code.
In the orgnial IDE i can compiled this but in jaPBe a hafe a ASM error.
Settings in jaPBe and orginal IDE:
ASM: on
OnError: on
Code: Select all
!EXTRN _PB_2DDrawing_GlobalStructure
Procedure StartDrawingEx(hWindow)
Protected hdc.l
hdc = GetDC_(hWindow)
!MOV Eax, [p.v_hDC]
!MOV [_PB_2DDrawing_GlobalStructure], Eax
ProcedureReturn 1
EndProcedure
Procedure StopDrawingEx(hWindow)
Protected hdc.l
hdc = 0
!MOV Eax,[_PB_2DDrawing_GlobalStructure]
!MOV [p.v_hDC], Eax
ReleaseDC_(hWindow, hdc)
EndProcedure
OpenWindow(0, 0, 0, 640, 480, "Test")
Repeat
StartDrawingEx(WindowID(0))
Box(10, 10, 400, 300, RGB(255, 0, 0))
LineXY(200, 100, 250, 300, RGB(255, 255, 0))
StopDrawingEx(WindowID(0))
Delay(10)
Until WindowEvent() = #PB_Event_CloseWindow
my live space
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
@ Nicolaus
I also get an ASM error using the PBIDE or the command line compiler (test.pb is your code), with or without ASM enabled :
And Fred said you don't need this hack anymore :This code also works in jaPBe.
I also get an ASM error using the PBIDE or the command line compiler (test.pb is your code), with or without ASM enabled :
Anyway, there is sometimes a problem with jaPBe when !EXTRN _PB_InternalStuff is used, probably a path problem (the PB IDE perhaps changes the path before compiling ?). You may fix it by changing the working path in the projects options ( F8 ) to %Purebasic%\Compilers)C:\PureBasic400\Compilers>pbcompiler test.pb
******************************************
PureBasic v4.01 (Windows - x86)
******************************************
Compiling test.pb
Loading external libraries...
Starting compilation...
33 lines processed.
Creating executable.
Error: Assembler
PureBasic.asm [162]:
MP0
PureBasic.asm [81] MP0 [10]:
MOV Eax, [p.v_hDC]
error: undefined symbol.
And Fred said you don't need this hack anymore :
Code: Select all
Structure PB_2DDrawingInfo
*hDC
; There is more stuff here, but we try to keep this private
EndStructure
Import "kernel32.lib" ; It's not in the kernel32.lib, but it's the one always linked :)
PB_2DDrawing_GlobalStructure.PB_2DDrawingInfo ; For non-threaded
PB_2DDrawing_Globals ; For threadedsafe mode
PB_Object_GetThreadMemory(*Globals)
EndImport
Procedure StartDrawingEx(hWindow)
CompilerIf #PB_Compiler_Thread
*Globals.PB_2DDrawingInfo = PB_Object_GetThreadMemory(PB_2DDrawing_Globals)
*Globals\hDC = GetDC_(hWindow)
CompilerElse
PB_2DDrawing_GlobalStructure\hDC = GetDC_(hWindow)
CompilerEndIf
ProcedureReturn 1
EndProcedure
Procedure StopDrawingEx(hWindow)
CompilerIf #PB_Compiler_Thread
*Globals.PB_2DDrawingInfo = PB_Object_GetThreadMemory(PB_2DDrawing_Globals)
ReleaseDC_(hWindow, *Globals\hDC)
CompilerElse
ReleaseDC_(hWindow, PB_2DDrawing_GlobalStructure\hDC)
CompilerEndIf
EndProcedure
OpenWindow(0, 0, 0, 640, 480, "Test")
Repeat
StartDrawingEx(WindowID(0))
Box(10, 10, 400, 300, RGB(255, 0, 0))
LineXY(200, 100, 250, 300, RGB(255, 255, 0))
StopDrawingEx(WindowID(0))
Delay(10)
Until WindowEvent() = #PB_Event_CloseWindow
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
hello gnozal,
1/
i tried the update you made for the default icon, but how it works ?
by definining the icon in menu->prefrences->project->icon ?
can you provide inside the jaPBe archive a default icon (.../jaPBeForPB400_3611/project.ico)
which is - by design - already defined into the icon field (in the prefs->project page) ?
2/
just an another idea
sometimes, when a program (purebasic-made) crash or fall into an endless loop, programmer have to kill it himself in the processus list (Ctrl+Alt+Sup).
if debugger is ON, it's easy to stop it !
but if the debugger is OFF,
it would be very handy to stop the program directly from jaPBe.
i think it can be done by getting the PID of the running program and then 'kill' it.
does the purebasic sdk send you the PID after compiling/running it ? if so it would be trivial...
one more time, an option for lazy programmers
1/
i tried the update you made for the default icon, but how it works ?
by definining the icon in menu->prefrences->project->icon ?
can you provide inside the jaPBe archive a default icon (.../jaPBeForPB400_3611/project.ico)
which is - by design - already defined into the icon field (in the prefs->project page) ?
2/
just an another idea

sometimes, when a program (purebasic-made) crash or fall into an endless loop, programmer have to kill it himself in the processus list (Ctrl+Alt+Sup).
if debugger is ON, it's easy to stop it !
but if the debugger is OFF,
it would be very handy to stop the program directly from jaPBe.
i think it can be done by getting the PID of the running program and then 'kill' it.
does the purebasic sdk send you the PID after compiling/running it ? if so it would be trivial...
one more time, an option for lazy programmers

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
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Yes, that's the idea. This icon should appear in every new project.Flype wrote:1/
i tried the update you made for the default icon, but how it works ?
by definining the icon in menu->prefrences->project->icon ?
Ok, will see, but I don't want to force this icon. The [...] button will point to this default icon if it exists.Flype wrote:Can you provide inside the jaPBe archive a default icon (.../jaPBeForPB400_3611/project.ico)
which is - by design - already defined into the icon field (in the prefs->project page) ?
I have the compiler process ID, but the SDK does not send the running program ID (AFAIK, there is no documentation about the compiler SDK), and the compiler chooses the EXE name if compile/run.Flype wrote:2/
just an another idea![]()
sometimes, when a program (purebasic-made) crash or fall into an endless loop, programmer have to kill it himself in the processus list (Ctrl+Alt+Sup).
if debugger is ON, it's easy to stop it !
but if the debugger is OFF,
it would be very handy to stop the program directly from jaPBe.
i think it can be done by getting the PID of the running program and then 'kill' it.
does the purebasic sdk send you the PID after compiling/running it ? if so it would be trivial...
It's done like this in jaPBe :
Code: Select all
PostThreadMessage_(CompilerThreadID, PB_MSG_ID, #PB_MSG_Start_Compilation, flags)
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Update
Minor changes :
- added some icons in %jaPBe%\Icons
- the icon (chosen with the [...] button) in Preferences/Project is %jaPBe%\Icons\DefaultProject.ico by default.
Minor changes :
- added some icons in %jaPBe%\Icons
- the icon (chosen with the [...] button) in Preferences/Project is %jaPBe%\Icons\DefaultProject.ico by default.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).