Page 43 of 104

Re: Best use of Projects and PureForm?

Posted: Sat Dec 30, 2006 9:33 am
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 ...

Posted: Wed Jan 03, 2007 8:40 pm
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.

Posted: Thu Jan 04, 2007 9:24 am
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]

Posted: Sun Jan 07, 2007 10:03 pm
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")

Posted: Mon Jan 08, 2007 12:18 am
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

Posted: Mon Jan 08, 2007 8:32 am
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.

Posted: Mon Jan 08, 2007 9:51 am
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).

Posted: Mon Jan 08, 2007 9:53 am
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

Posted: Mon Jan 08, 2007 9:54 am
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.

Posted: Tue Jan 09, 2007 10:10 am
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.

Posted: Tue Jan 09, 2007 11:39 am
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 ?

Posted: Tue Jan 09, 2007 11:53 am
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.

Posted: Tue Jan 09, 2007 12:10 pm
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 ?

Posted: Tue Jan 09, 2007 1:13 pm
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.

Posted: Tue Jan 09, 2007 1:31 pm
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.