jaPBe 3.13.4 [IDE for PB 4 and PB 5]

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

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

Re: Best use of Projects and PureForm?

Post by gnozal »

Q*bert wrote:1) Can someone explain jaPBe projects to me?
a) Do you reopen a project by opening the .pbfl file?
b) Are there other advantages to using projects beyond (a)
In jaPBe, a project is a list of files saved as .pbfl file.
If your project only has one file, saving as .pb is enough.
Q*bert wrote:2) What is the best way to use the PureForm plugin to maintain forms within jaPBe projects?
a) Should I create a separate .pbf file, use "Save as code" to create a separate .pb file and add it to the jaPBe project, or use the code windows "Copy code to jaPBe"?
b) If I later modify the window/gadget code, do I always need to use "Translate from source" to get the changes recognized in PureForm, or is there some way to have PureForm rescan the code automatically?
PureFORM is still in development.
Currently, to update a source, I maximize the CodeView window, then copy and paste the code changes in my source, and then minimize the CodeView.
The "Translate from source" feature is convenient to import forms from sources not created with PureFORM, but not to update an existing form, as you will loose some information (not all PureFORM features are implemented in the import routine).
I am working on an 'automatic' source update feature, but I am still not sure how to do it. PureFORM will probably have to add some 'code tags' as comments in the generated code and update the code in your source between the code tags. I will probably also add some 'code inject' feature.
But this is WIP ...
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
oryaaaaa
Addict
Addict
Posts: 825
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

Post by oryaaaaa »

Crash report

2byte-charactor-code, I set Japanese(932). but from 4.0.
Set UTF-8(65001).

I write 2byte charactor, and jaPBe crushed. Please add UTF8(2bytemode)

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

Post by gnozal »

oryaaaaa wrote:Crash report

2byte-charactor-code, I set Japanese(932). but from 4.0.
Set UTF-8(65001).

I write 2byte charactor, and jaPBe crushed. Please add UTF8(2bytemode)

Thank you.
Sorry, can't reproduce this.
My sequence :
New file
F8 : Set Japanese(932)
Type "éééé"
F8 : Set UTF-8(65001)
Type "éééé"
No crash ['é' in UTF-8 is 'é' in ANSI, so I assume it's a 2 byte character]
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 »

hello gnozal,

It would be nice to support 'https://' and 'ftp://' for the url-hotspot feature.

A valid url can be easily checked with win32 api :

Code: Select all

Import "urlmon.lib" 
  IsValidURL(*pBC, Url.p-bstr, dwReserved.l) 
EndImport

Macro CheckUrl(Url)
  (#S_FALSE - IsValidURL(#Null, Url, #Null))
EndMacro

Debug CheckUrl("//not/a/valid/url.pb")
Debug CheckUrl("file://server/test.pb")
Debug CheckUrl("ftp://www.purebasic.com")
Debug CheckUrl("http://www.purebasic.com")
Debug CheckUrl("https://www.purebasic.com")
Debug CheckUrl("mailto:support@purebasic.com")
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
oryaaaaa
Addict
Addict
Posts: 825
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

Post by oryaaaaa »

TEST, thanks
Sorry, can't reproduce this.
My sequence :
New file
F8 : Set Japanese(932)
Type "éééé"
F8 : Set UTF-8(65001)
Type "éééé"
No crash
Load UTF-8(65001) Source
TYPE " " (UNICODE 2byte charactor by IME, input 2byte x charactors)
Crash

but no problem (Scintilla DLL), Its jaPBe bugs
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Flype wrote:hello gnozal,

It would be nice to support 'https://' and 'ftp://' for the url-hotspot feature.

A valid url can be easily checked with win32 api :

Code: Select all

Import "urlmon.lib" 
  IsValidURL(*pBC, Url.p-bstr, dwReserved.l) 
EndImport

Macro CheckUrl(Url)
  (#S_FALSE - IsValidURL(#Null, Url, #Null))
EndMacro

Debug CheckUrl("//not/a/valid/url.pb")
Debug CheckUrl("file://server/test.pb")
Debug CheckUrl("ftp://www.purebasic.com")
Debug CheckUrl("http://www.purebasic.com")
Debug CheckUrl("https://www.purebasic.com")
Debug CheckUrl("mailto:support@purebasic.com")
On the todo list.
Nice example, but PB4 only, and jaPBe code is still PB3.94.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

oryaaaaa wrote:TEST, thanks
Load UTF-8(65001) Source
TYPE " " (UNICODE 2byte charactor by IME, input 2byte x charactors)
Crash
but no problem (Scintilla DLL), Its jaPBe bugs
Sorry, no crash here (WinNT4 french).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

jaPBe 3.7.1

Changes :
- added 'https://' and 'ftp://' in URL style
- fixed URL not being styled if more than one URL in a comment
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 »

On the todo list.
Nice example, but PB4 only, and jaPBe code is still PB3.94.
ah yes :D but this one is PB3.94 compatible :wink:

Code: Select all

Procedure.l CheckUrl(Url.s)
  
  Dim unicode.w(Len(Url))
  
  id.l = OpenLibrary(#PB_Any, "urlmon.dll")
  
  If id And MultiByteToWideChar_(#CP_ACP, #Null, Url, Len(Url), @unicode(), Len(Url))
    result.l = (#S_FALSE - CallFunction(id, "IsValidURL", #Null, @unicode(), #Null) )
    CloseLibrary(id)
  EndIf 
  
  ProcedureReturn result 
  
EndProcedure

Debug CheckUrl("//not/a/valid/url.pb")
Debug CheckUrl("file://server/test.pb")
Debug CheckUrl("ftp://www.purebasic.com")
Debug CheckUrl("http://www.purebasic.com")
Debug CheckUrl("https://www.purebasic.com")
Debug CheckUrl("mailto:support@purebasic.com")


[EDIT]
Too late :P Gnozal's faster than Lucky Luke.
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
JoRo
User
User
Posts: 70
Joined: Sat May 10, 2003 2:03 pm
Location: Essen, Germany
Contact:

Post by JoRo »

Since update to 400 the debugger is no longer running.
I always get a "written" error message.
My source is really great, more then 30.000 lines.
The debugger works, when used directly from PB.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

JoRo wrote:Since update to 400 the debugger is no longer running.
400 ?
You mean PB 4.0x ?

What version of PB are you using ?
What version of jaPBe are you using ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
JoRo
User
User
Posts: 70
Joined: Sat May 10, 2003 2:03 pm
Location: Essen, Germany
Contact:

Post by JoRo »

PB 4.02
Japbe 400 / 3.7.1.602
It is since I update both to version 4.

I had this in the past, in an earlier build of japbe too.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

JoRo wrote:PB 4.02
Japbe 400 / 3.7.1.602
:shock:

No problem here (same versions).

The user oryaaaaa had an analog problem, wich he apparently solved (see a few posts back in the same thread).

So F6 does not work ? what about F5 ?
F5 and F6 share the same code, it's just a flag change : PostThreadMessage_(CompilerThreadID, PB_MSG_ID, #PB_MSG_Start_Compilation, flags)
JoRo wrote:The debugger works, when used directly from PB.
Internal debugger / External debugger / Both ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
JoRo
User
User
Posts: 70
Joined: Sat May 10, 2003 2:03 pm
Location: Essen, Germany
Contact:

Post by JoRo »

The compiler works, only in debug modus, the error occurs. Correct me if I am wrong, but F5 is without debugger.

Do not know much about the system of PB compilers when started in PB directly, I just enable "Use Debugger" or so - I use Japbe :-)

Well, I think, you should open for every build a new thread, this here is nothing to search, in which version which bug was fixed or worked around, and of course get an own forum inside this forum. I would run crazy, if I had to use the PB editor.

Oryaaaa problem was gone with build 4.02, I use 4.02, and the problem stays.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

JoRo wrote:The compiler works, only in debug modus, the error occurs. Correct me if I am wrong, but F5 is without debugger.
Yes, F5 is without debugger but as I explained it's the same code in jaPBe.
JoRo wrote:Do not know much about the system of PB compilers when started in PB directly, I just enable "Use Debugger" or so - I use Japbe :-)
In the PB IDE, look at 'Debugger' in the 'Preferences' dialog : there is a combobox 'Choose debugger type'.

There is probably a problem with your PB and/or jaPBe installation.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Post Reply