FreeBasic IDE-poseidonFB(Update 2020.07.20)

User projects written in or related to FreeBASIC.
UEZ
Posts: 624
Joined: May 05, 2017 19:59
Location: Germany

Re: FreeBasic IDE-poseidonFB(Update 2020.05.27)

Postby UEZ » May 27, 2020 12:39

UEZ wrote:
Kuan Hsu wrote:........@@..........
Dear UEZ:
Please tell me more details about this bug, iu occur while using "Goto Definition" / "Show Type"? of just simple key in?
Is there a fixed and easy way to reproduce it?

That's not easy to reproduce because it doesn't occur everytime. As far as I can remember I pasted to the editor some lines and pressed enter than the em appeared.
Anyhow, I will make a note when the em appears again and let you know.


The em occurred again when I have changed the code in the editor
from:

Code: Select all

Do
   Cls
   For i = 0 To iAmount - 1
      Waves(i).Display
   Next
   Flip
   Sleep(1)
Loop Until Inkey() = Chr(27)

copied "Inkey() = Chr(27)" and pasted above Sleep(1)

Code: Select all

Do
   Cls
   For i = 0 To iAmount - 1
      Waves(i).Display
   Next
   Flip
   Inkey() = Chr(32) '<---- here
   Sleep(1)
Loop Until Inkey() = Chr(27)

and put the cursor just after 27 to change it to 32. After I pressed the backspace button the em appeared.
When I want to reproduce it again then it works - no em. As mentioned above I cannot reproduce the em after it occurs.


Btw, can you add a tidy function to format the code? This will be very useful!
Makoto WATANABE
Posts: 195
Joined: Apr 10, 2010 11:41
Location: Japan
Contact:

Re: FreeBasic IDE-poseidonFB(Update 2020.05.27)

Postby Makoto WATANABE » May 27, 2020 15:48

Dear Kuan Hsu;

Thanks for your tremendous efforts.
You are great.

I have registered 3 chms on PoseidonFB.
Pressing F1 on each keyword in a code brought up the appropriate help page.

There is one problem.
The first chm is fine, but in the case of keywords for the second and third chm, the following message is shown twice related to the first chm.
Example of the case where win32 is registered as the first:
*************************************
HTML Help Author Message
The window name "Win32 API" passed to HH_GET_WIN_TYPE has not been specified.
*************************************

When the first chm is changed to FB-manualJP, the display is as follows.
*************************************
HTML Help Author Message
The window name "FB-manualJP" passed to HH_GET_WIN_TYPE has not been specified.
*************************************
marcov
Posts: 3011
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: FreeBasic IDE-poseidonFB(Update 2020.05.27)

Postby marcov » May 28, 2020 11:28

I'm interested how you do this, at least if you search multiple CHMs via winapi calls. Do you search index or fulltext search?

I've studied on this in the past, and the only solution I found was to generate a master CHM that refers all slave CHMs (the chms you have registered), and then open that one with your queries. The helpsystem will then generate a combined index (a .chw file) and use that for searching.

If you have small compilable examples of the principles of your multifile CHM support that would be great. I'll even install FB after fifteen years on the forum ( ;-) )

I maintain a CHM reading and writing library in Free pascal, if you need a DLL that examines CHMs and returns certain data (e.g. index as string), just yell, and I'll make it.
Kuan Hsu
Posts: 470
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2020.05.27)

Postby Kuan Hsu » May 28, 2020 13:01

UEZ wrote:The em occurred again when I have changed the code in the editor
......

and put the cursor just after 27 to change it to 32. After I pressed the backspace button the em appeared.
When I want to reproduce it again then it works - no em. As mentioned above I cannot reproduce the em after it occurs.

Btw, can you add a tidy function to format the code? This will be very useful!
(1) Thank you! It helps a lot! The action will trigger calltip thread first and trigger ParserLive! second, I think the issue is the calltip thread is searching the parsedTree and ParserLive! try to modify the parsedTree at same time.
(2) Like https://freebasic.net/forum/viewtopic.php?f=8&t=16701#p252025? If yes, I think I can transform it to plugin, and read from document and formating then paste to original document( without file I/O )
Kuan Hsu
Posts: 470
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2020.05.27)

Postby Kuan Hsu » May 28, 2020 13:19

marcov wrote:I'm interested how you do this, at least if you search multiple CHMs via winapi calls. Do you search index or fulltext search?

I've studied on this in the past, and the only solution I found was to generate a master CHM that refers all slave CHMs (the chms you have registered), and then open that one with your queries. The helpsystem will then generate a combined index (a .chw file) and use that for searching.

If you have small compilable examples of the principles of your multifile CHM support that would be great. I'll even install FB after fifteen years on the forum ( ;-) )

I maintain a CHM reading and writing library in Free pascal, if you need a DLL that examines CHMs and returns certain data (e.g. index as string), just yell, and I'll make it.

I must say honestly, I don't know how could I do......

All I done was looking for the example code about HtmlHelp, and turn it to D code and using in poseidonFB, basically I think the MSDN tell me: "NULL indicates that the help window has not yet been created.", so if the return value is null, try searching other paths......

But things aren't always simply, I try to create a poseidonFB plugin to perform search multiple CHMs, it fail......., even I use D do a another independent code, I still can't search multiple CHMs successfully.......

Chinese proverb: "A blind cat meets a dead rat"
Every dog has his day
Kuan Hsu
Posts: 470
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2020.05.27)

Postby Kuan Hsu » May 28, 2020 13:26

Makoto WATANABE wrote:Dear Kuan Hsu;

Thanks for your tremendous efforts.
You are great.

I have registered 3 chms on PoseidonFB.
Pressing F1 on each keyword in a code brought up the appropriate help page.

There is one problem.
The first chm is fine, but in the case of keywords for the second and third chm, the following message is shown twice related to the first chm.
Example of the case where win32 is registered as the first:
*************************************
HTML Help Author Message
The window name "Win32 API" passed to HH_GET_WIN_TYPE has not been specified.
*************************************

When the first chm is changed to FB-manualJP, the display is as follows.
*************************************
HTML Help Author Message
The window name "FB-manualJP" passed to HH_GET_WIN_TYPE has not been specified.
*************************************

Dear Watanabe san:
Like I post in last reply, I don't know what happens, but in my computer, search the FB-manualJP.chm / Win32JP.chm / helpWindow9JP.chm, the "The window name "XXXXX" passed to HH_GET_WIN_TYPE has not been specified" is never shown......
Kuan Hsu
Posts: 470
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2020.05.27)

Postby Kuan Hsu » May 28, 2020 13:40

jepalza wrote:New "Spanish.lng" adapted to 0.433 from "English.lng", with reformatted TABS

https://drive.google.com/open?id=1Hro0u ... Ktp7riSWpz
Thank you~
marcov
Posts: 3011
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: FreeBasic IDE-poseidonFB(Update 2020.05.27)

Postby marcov » May 28, 2020 14:32

Kuan Hsu wrote:All I done was looking for the example code about HtmlHelp, and turn it to D code and using in poseidonFB, basically I think the MSDN tell me: "NULL indicates that the help window has not yet been created.", so if the return value is null, try searching other paths......

But things aren't always simply, I try to create a poseidonFB plugin to perform search multiple CHMs, it fail......., even I use D do a another independent code, I still can't search multiple CHMs successfully.......


The only way I found is using this master/slave solution, but my own CHM compiler can't do that (succesfully) yet, and it also has requirements on the slave CHMs, so you can't simply use any CHMs for it. (see http://kb.helpwaregroup.com/ms-html-help/merge)

Currently, we work around this, and get the indexes from all the CHMs, and then select the match ourselves, and then fire the correct chm + path for the topic and invoke the help system.
Makoto WATANABE
Posts: 195
Joined: Apr 10, 2010 11:41
Location: Japan
Contact:

Re: FreeBasic IDE-poseidonFB(Update 2020.05.28)

Postby Makoto WATANABE » May 29, 2020 6:54

Dear Kuan Hsu;

Thanks for your reply.

I installed PoseidonFB on another computer with the same Windows10 version and tried it in a similar environment.
As you say, the "HTML Help Author Message" didn't show up at all, and the three chm's were searchable.
It's a strange thing.
In any case, I'm happy that the help page I need is now there.
Thank you very much.
Kuan Hsu
Posts: 470
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2020.05.27)

Postby Kuan Hsu » May 30, 2020 5:36

marcov wrote:
Kuan Hsu wrote:All I done was looking for the example code about HtmlHelp, and turn it to D code and using in poseidonFB, basically I think the MSDN tell me: "NULL indicates that the help window has not yet been created.", so if the return value is null, try searching other paths......

But things aren't always simply, I try to create a poseidonFB plugin to perform search multiple CHMs, it fail......., even I use D do a another independent code, I still can't search multiple CHMs successfully.......


The only way I found is using this master/slave solution, but my own CHM compiler can't do that (succesfully) yet, and it also has requirements on the slave CHMs, so you can't simply use any CHMs for it. (see http://kb.helpwaregroup.com/ms-html-help/merge)

Currently, we work around this, and get the indexes from all the CHMs, and then select the match ourselves, and then fire the correct chm + path for the topic and invoke the help system.
Indeed, so I need rip the hhk or hhc from the CHM and check the if keyword is existed in them, then use HtmlHelp function.
What way do you use to get the indexes? I test in my poseidonFb pllugin by 2ways:
(1) No need any external libs /dlls but very rough, use "HH -decompile" to get all files and take hhk/hhc, then delete others
(2) Use 7z.dll to get the the hhk/hhc

The plugin: https://bitbucket.org/KuanHsu/poseidon- ... r/CHMhelp/
Last edited by Kuan Hsu on May 30, 2020 7:37, edited 1 time in total.
Kuan Hsu
Posts: 470
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2020.05.28)

Postby Kuan Hsu » May 30, 2020 5:41

Makoto WATANABE wrote:Dear Kuan Hsu;

Thanks for your reply.

I installed PoseidonFB on another computer with the same Windows10 version and tried it in a similar environment.
As you say, the "HTML Help Author Message" didn't show up at all, and the three chm's were searchable.
It's a strange thing.
In any case, I'm happy that the help page I need is now there.
Thank you very much.

Later I'll release the plugin about CHM, please test then.......
Ok, I've updated to bitbucket
https://bitbucket.org/KuanHsu/poseidon- ... rc/master/
Please check the if "The window name "XXXXX" passed to HH_GET_WIN_TYPE has not been specified" is disappear or not?

Use "Set Custom Tool...", create a tool using CHMhelp.dll
Call setup dialog= put the cursor on empty pos( without any word ) in document, press short-cut
Call CHM= put the cursor on keyword, press short-cut

The 7-zip32.dll and 7z.dll are from:
http://frostmoon.sakura.ne.jp/
marcov
Posts: 3011
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: FreeBasic IDE-poseidonFB(Update 2020.05.27)

Postby marcov » May 30, 2020 14:08

Kuan Hsu wrote:Indeed, so I need rip the hhk or hhc from the CHM and check the if keyword is existed in them, then use HtmlHelp function.


Yes. Currently we (as in Lazarus and Free Pascal's textmode IDE) also emulate the viewer (for cross platform reasons), but IMHO the quality is bad. I rather use the windows viewer at least on windows.

What way do you use to get the indexes?


Freepascal has a complete reading and writing CHM library, a commandline compiler and a commandline lister/extractor. I offered to make a DLL with an extractor function in it, but if you can use 7z.dll, that is probably better for you on the long run.

I test in my poseidonFb pllugin by 2ways:
(1) No need any external libs /dlls but very rough, use "HH -decompile" to get all files and take hhk/hhc, then delete others


Extracting all is maybe possible, but could be slow for very large CHMs (our largest CHM has 19-25000 files depending on options). Better add a DLL and be safe long term.

(2) Use 7z.dll to get the the hhk/hhc


If that works, that's better I think. Then you don't need me to make an extractor



Thanks. I'll keep it for reference.

For fun, here the FB (0.20) CHM loaded into our textmode IDE. Unfortunately, the HTML-to-text renderer makes a cake out of the TOC.

Image and
Image
Kuan Hsu
Posts: 470
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2020.05.27)

Postby Kuan Hsu » May 30, 2020 16:53

marcov wrote:Freepascal has a complete reading and writing CHM library, a commandline compiler and a commandline lister/extractor. I offered to make a DLL with an extractor function in it, but if you can use 7z.dll, that is probably better for you on the long run.

If that works, that's better I think. Then you don't need me to make an extractor

If you have free time, I'm very glad to do testing.
Last edited by Kuan Hsu on May 31, 2020 12:07, edited 1 time in total.
Makoto WATANABE
Posts: 195
Joined: Apr 10, 2010 11:41
Location: Japan
Contact:

Re: FreeBasic IDE-poseidonFB(Update 2020.05.28)

Postby Makoto WATANABE » May 31, 2020 6:06

Dear Kuan Hsu;

Thank you for preparing the Custom Tool.

I understand that "CHMhelp.dll" is an application that extracts "hhk" from "chm" and registers it in the poseidonFB folder.
The situation where the "HTML Help Author Message" was displayed did not change.

I have checked with 3 PCs, two are Windows10 and the other is Windows10 Pro.
The message was displayed on one Windows 10, but on the other two including Windows10 Pro, the corresponding page of chm was displayed immediately.

By the way, here's another matter.
In Options -> Manual, the "+" button will bring up a screen to register additional names.
However, in Options -> Tools -> Set Custom Tools, pressing the "+" button does not display the screen.

I registered the Custom Tool by editing "editorSettings.ini".
Kuan Hsu
Posts: 470
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2020.05.28)

Postby Kuan Hsu » May 31, 2020 12:16

Makoto WATANABE wrote:Dear Kuan Hsu;

Thank you for preparing the Custom Tool.

I understand that "CHMhelp.dll" is an application that extracts "hhk" from "chm" and registers it in the poseidonFB folder.
The situation where the "HTML Help Author Message" was displayed did not change.

I have checked with 3 PCs, two are Windows10 and the other is Windows10 Pro.
The message was displayed on one Windows 10, but on the other two including Windows10 Pro, the corresponding page of chm was displayed immediately.

By the way, here's another matter.
In Options -> Manual, the "+" button will bring up a screen to register additional names.
However, in Options -> Tools -> Set Custom Tools, pressing the "+" button does not display the screen.

I registered the Custom Tool by editing "editorSettings.ini".

(1) OK, except for different version of OS, maybe chm itself?
(2) In past time, I kept the custom took items <= 5 items, I've modified to max=12 items at rev.435; there is a big change at rev.435, the "Include levels" now files in project at same level 0, if the we set "Include levels" = 0, we still can use / search the parsedTree of files of project, #include the FILE-A( not in project ) is 1st level, FILE-A include FILE-B is 2nd level, because the project is level 0, so any files in project include FILE-A is 1st level
Image
As top pic when "Include levels" = 1, FILE-2 and FILE-1 can show the parseTree of FILE-B, but FILE-3 only show FILE-A

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 2 guests