Page 51 of 104
run/debug opens code in a new file?
Posted: Thu Aug 02, 2007 8:54 pm
by nhokem
I just updated to the latest version (3.7.8.655) and when I "run/debug" any program that has errors, jaPBe opens a new file with my code in it and highlights the error on this new file (the new file is named "PB_EditorOutput2.pb"). Now when I need to make fixes I have to close this file, then go back to my code and search for where it bombed (in other words, I'm spoiled by the IDE). (note: if there are no errors, the new file does not open and everything is like before).
Is there any way I can turn this off? I've checked the "preferences" dialog and can't find any options about opening code in a new file when there are errors...
Thanks!
Re: run/debug opens code in a new file?
Posted: Fri Aug 03, 2007 7:32 am
by gnozal
nhokem wrote:I just updated to the latest version (3.7.8.655) and when I "run/debug" any program that has errors, jaPBe opens a new file with my code in it and highlights the error on this new file (the new file is named "PB_EditorOutput2.pb").
It's a bug, because of the new feature (PB_EditorOutput2.pb is a copy of the original source file, and as it's filename is different, it's opened ...)
I will fix this.
Posted: Fri Aug 03, 2007 8:46 am
by gnozal
Update
Changes :
- this release (build 656) should fix the bug reported by nhokem introduced in build 655.
Posted: Fri Aug 03, 2007 1:36 pm
by nhokem
gnozal wrote:Update
Changes :
- this release (build 656) should fix the bug reported by nhokem introduced in build 655.
woohoo! thanks for the quick reply and fix!
Posted: Sun Aug 12, 2007 10:12 am
by DataMiner
Hi Gnozal,
i installed japbe on MS Vista with some strange results. First it seems not to find the location of purebasic, so i manually added the purebasic path.
Now everything looks fine, compiler is found. But if i compile a code, i only get "PBDebugger Error(...)". It is never the same error, sometimes 109, than 31, 32, 16, 78.
Any idea?
Posted: Mon Aug 13, 2007 7:53 am
by gnozal
DataMiner wrote:Hi Gnozal,
i installed japbe on MS Vista with some strange results. First it seems not to find the location of purebasic, so i manually added the purebasic path.
Now everything looks fine, compiler is found.
Maybe the registry entry is different. Could you post the location ?
(it's usually #HKEY_CLASSES_ROOT\Applications\PureBasic.exe\shell\Open\command on NT based systems)
Or, jaPBe doesn't have the right to read the registry : check UAC.
DataMiner wrote: But if i compile a code, i only get "PBDebugger Error(...)". It is never the same error, sometimes 109, than 31, 32, 16, 78.
Any idea?
Not really, I don't have Vista ...
Are you using PB4.0x or PB4.10(beta) ?
If PB4.0x, it's the PBCompiler that starts the debugger
If PB4.10, it's jaPBe that starts the debugger
Code: Select all
RunProgram(CompilerPath$ + "PBDebugger.exe", "-o " + #g + DebuggerOptionFile$ + #g, IncludeFullPath)
Anyway, check UAC ?
Did you install jaPBe in "Program files" ? If yes, try another location.
Posted: Mon Aug 13, 2007 1:11 pm
by freak
HKEY_CLASSES_ROOT is not writable on Vista for a normal user, that is why there is a different location on this OS. Here is the code i use for Vista:
Code: Select all
; Funny, this is the exact same code as for Win9x, only with
; #HKEY_CURRENT_USER instead of #HKEY_LOCA_MACHINE ;)
;
If RegCreateKeyEx_(#HKEY_CURRENT_USER, "Software\Classes\PureBasic.exe\shell\open\command", 0, 0, #REG_OPTION_NON_VOLATILE, #KEY_ALL_ACCESS, 0, @NewKey, @KeyInfo) = #ERROR_SUCCESS
StringBuffer$ = Chr(34)+PureBasicPath$+"PureBasic.exe"+Chr(34)+" "+Chr(34)+"%1"+Chr(34)
RegSetValueEx_(NewKey, "", 0, #REG_SZ, StringBuffer$, Len(StringBuffer$)+1)
RegCloseKey_(NewKey)
EndIf
If RegCreateKeyEx_(#HKEY_CURRENT_USER, "Software\CLASSES\.pb", 0, 0, #REG_OPTION_NON_VOLATILE, #KEY_ALL_ACCESS, 0, @NewKey, @KeyInfo) = #ERROR_SUCCESS
RegSetValueEx_(NewKey, "", 0, #REG_SZ, "PureBasic.exe", Len("PureBasic.exe")+1)
RegCloseKey_(NewKey)
EndIf
If RegCreateKeyEx_(#HKEY_CURRENT_USER, "Software\CLASSES\.pbi", 0, 0, #REG_OPTION_NON_VOLATILE, #KEY_ALL_ACCESS, 0, @NewKey, @KeyInfo) = #ERROR_SUCCESS
RegSetValueEx_(NewKey, "", 0, #REG_SZ, "PureBasic.exe", Len("PureBasic.exe")+1)
RegCloseKey_(NewKey)
EndIf
Also i realized that i forgot to announce two changes i made that might
be of intrest to you:
For the compiler communication, there is a new "SOURCEALIAS" command .
You can read about it in the CompilerInterface.txt included in the SDK for beta3
For the "-o" file when executing the debugger, i have added a new possible entry:
Code: Select all
PREFERENCES <filename>
allows to set the full path for the PureBasic.prefs from which the debugger loads its options
Without the PREFERENCES entry, the debugger searches in the AppData dir like it did before.
I just needed to be able to specify a different one for debugging in admin mode
on vista, because this changes the current user for the debugger.
Posted: Mon Aug 13, 2007 2:03 pm
by gnozal
@Freak Thanks for the informations.
@DataMiner
1. jaPBe path problem :
Could you test the code below and see if it returns the PB installation directory ?
Code: Select all
Procedure.s GetPureBasicPath()
Buffer$=Space(10000):BufferSize=Len(Buffer$)-1
OutputDirectory$ = ""
If GetVersion_() & $FF0000 ; Windows NT/XP
If RegOpenKeyEx_(#HKEY_CLASSES_ROOT, "Applications\PureBasic.exe\shell\open\command", 0, #KEY_ALL_ACCESS , @key) = #ERROR_SUCCESS
If RegQueryValueEx_(key, "", 0, @Type, @Buffer$, @BufferSize) = #ERROR_SUCCESS
OutputDirectory$ = GetPathPart(Mid(Buffer$, 2, Len(Buffer$)-7))
EndIf
EndIf
If OutputDirectory$ = "" ; for Vista ...
If RegOpenKeyEx_(#HKEY_CURRENT_USER, "Software\Classes\PureBasic.exe\shell\open\command", 0, #KEY_ALL_ACCESS , @key) = #ERROR_SUCCESS
If RegQueryValueEx_(key, "", 0, @Type, @Buffer$, @BufferSize) = #ERROR_SUCCESS
OutputDirectory$ = GetPathPart(Mid(Buffer$, 2, Len(Buffer$)-7))
EndIf
EndIf
EndIf
Else ; The same for Win9x
If RegOpenKeyEx_(#HKEY_LOCAL_MACHINE, "Software\Classes\PureBasic.exe\shell\open\command", 0, #KEY_ALL_ACCESS , @key) = #ERROR_SUCCESS
If RegQueryValueEx_(key, "", 0, @Type, @Buffer$, @BufferSize) = #ERROR_SUCCESS
OutputDirectory$ = GetPathPart(Mid(Buffer$, 2, Len(Buffer$)-7))
EndIf
EndIf
EndIf
ProcedureReturn OutputDirectory$
EndProcedure
2. PBDebugger Error
Even with Freak's information, I am not sure what the problem is ...
Does the error message come from jaPBe or from the debugger ?
Posted: Mon Aug 13, 2007 5:09 pm
by DataMiner
@gnozal
1. yes, it returns the PB installation directory.
2. i can't believe it - it is gone... no debugger-errors any more ?!?
Good, i reinstalled everything in the meantime, but i did not do anything else like before. Strange ...
Thanks for your patience with me ...
Posted: Tue Aug 14, 2007 8:47 am
by gnozal
Update
Changes :
- updated GetPBFolder() for Vista compatibility
Posted: Sat Sep 01, 2007 8:40 am
by gnozal
Update
Changes :
- added : extra linker parameters in project options ( F8 )
- changed : jaPBe is now compiled with a static scintilla library (scilexer.dll is not needed anymore)
Note : in the source, you can choose to compile with Scintilla static or dynamic (see jaPBe.pb).
Posted: Wed Sep 05, 2007 6:28 am
by KIKI
gnozal wrote:Update
Changes :
- added : extra linker parameters in project options ( F8 )
- changed : jaPBe is now compiled with a static scintilla library (scilexer.dll is not needed anymore)
Note : in the source, you can choose to compile with Scintilla static or dynamic (see jaPBe.pb).
I use Windows XP SP2 French version and i have trouble with JAPBE. Every time i open a subwindows and i want to quit this subwindows JAPBE freeze and i am obliged to break the process.
Posted: Wed Sep 05, 2007 12:20 pm
by gnozal
KIKI wrote:I use Windows XP SP2 French version and i have trouble with JAPBE. Every time i open a subwindows and i want to quit this subwindows JAPBE freeze and i am obliged to break the process.
1. Only since the last update ?
2. What do you mean with 'subwindows' : new source file tab ?
Posted: Wed Sep 05, 2007 3:39 pm
by ebs
I have been using jaPBe for a long time, but recently I have been experiencing a problem.
I am currently using the latest versions of jaPBe (3.7.9.662) and PureBasic (4.10B3).
My problem is that most PureBasic built-in procedures/keywords don't seem to be recognized - there's
no hint displayed with the procedure parameters.
They
are listed on the "Proc" tab, which also makes me think that they aren't being recognized.
When jaPBe starts up, lots of definition files are loaded, including "PureBasic functions", so I don't understand what's going on.
Could I have messed up some entry in the
jaPBe.pref file?
Any help will be
GREATLY appreciated - I really want my jaPBe back!

Posted: Wed Sep 05, 2007 4:04 pm
by gnozal
2ebs
No problem here, using jaPBe 3.7.9.662 and PB4.10b3 : all PB functions (and userlib functions) are colored, autocompleted and the tooltips are working.
Strange ...
You said 'most PureBasic built-in procedures/keywords don't seem to be recognized' ; is it most or all ? Could you be more precise ?
Did you try to rename jaPBe.pref so that jaPBe creates a new file ?
Does the same problem happen with PB4.02 (change Purebasic path in preferences) ?