Powerbasic Museum 2020-B

Webmaster: José Roca (PBWIN 10+/PBCC 6+) (SDK Forum) => Discussion => Topic started by: Eros Olmi on March 29, 2011, 11:07:00 PM

Title: JellyFish + Lynx and PB10
Post by: Eros Olmi on March 29, 2011, 11:07:00 PM
I was using JellyFish + Lynx for all my projects but with PB10 Lynx is a mess.
Compile error everywhere and parsing of compiler result .log file is not recognized due to new info.

Also many many compile errors for missing equates and incompressible compile error in code that I think is correct.
It will be a long way ...
Title: Re: JellyFish + Lynx and PB10
Post by: José Roca on March 29, 2011, 11:17:03 PM
I have modified Lynx to work with PB 10 and the new headers and have added parsing for enums, interfaces, etc., with the exception of classes. But I have not checked the JF related code.
Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on March 30, 2011, 12:04:52 AM
I have Lynx sources till version 2.4.0.4
I will try to change it. It seems it fails to get correct PB compiler from registry too.
Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on March 30, 2011, 09:31:19 PM
For those using Lynx and have problems compiling with PBWin 10 (did not test with PBCC 6) here attached revised version 2.4.0.4
Mainly I fixed registry searching for PB compiler directory and also fixed .log file parsing (PB decided to change number of line where log starts info after copyright notice)

Let me know if you encounter any problem.
Eros

PS: I have authorization from Paul to redistribute source code but because I think José has a more advanced version of Lynx ("...  parsing for enums, interfaces, etc., with the exception of classes ...") I will not publish my sources in order to not create confusion.
Title: Re: JellyFish + Lynx and PB10
Post by: José Roca on March 30, 2011, 10:01:02 PM
Maybe we could collaborate. The attached file contains my modified version of Lynx. It compiles using PB10 and my new headers for PB10. I did not send it to you before because you still didn't have PB 10 at that time. You could add to it what you have done and then we will have a unique version that we could improve further.
Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on March 30, 2011, 10:20:38 PM
Yes, sure.

I will check tomorrow at office with my colleagues that also uses Lynx for their PB projects.
We get PB10 today so we have just started looking at it (awesome).

I compiled my Lynx with PB905.
I will check yours and I will apply my changes, are not many.

Maybe we can maintain a single copy of Lynx project into a SVN server.
I have one SVN server working on thinBasic web site. It is very easy to keep it updated using Tortoise SVN client.

I will let you know.
Eros

Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on March 30, 2011, 11:13:16 PM
Jose,

after many changes, I was able to compile your Lynx project using PB10 and your header files found here (http://www.jose.it-berater.org/smfforum/index.php?topic=4059.msg13892#msg13892)

Tomorrow I will apply to your Lynx project the changes I made into my Lynx project and let you know.

Eros
Title: Re: JellyFish + Lynx and PB10
Post by: José Roca on March 30, 2011, 11:38:37 PM
 
Which changes?  It compiles without any change.

I see. You have used the headers for PB 9, not for PB 10. Why?

The headers for PB 10 are available here:
http://www.jose.it-berater.org/smfforum/index.php?topic=4054.0
Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on March 31, 2011, 11:41:25 AM
My fault. I missed correct include files.

Anyhow here attached new Lynx with my changes.
So far I've just fixed Lynx for compiling from PBWin 10 but not PBCC 6.

Hope it works otherwise let me know.

Eros
Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on March 31, 2011, 02:45:55 PM
Just to let you know,

I'm in process of:

Eros
Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on April 03, 2011, 04:16:07 PM
Attached new Lynx version.

Regards
Eros
Title: Re: JellyFish + Lynx and PB10
Post by: José Roca on April 03, 2011, 04:49:36 PM
Thanks for your effort, Eros. I will try it with PBCC.
Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on April 03, 2011, 04:55:24 PM
They are less than nothing compared with yours  ;)
Title: Re: JellyFish + Lynx and PB10
Post by: José Roca on April 03, 2011, 05:12:50 PM
 
Lynx is a very useful tool. When you told me that the source was available, I thought in updating it and therefore I did not add projects to the new CSED editor. The best thing is that it can be used with any editor.

BTW I have successfully made CSED fully Unicode and High DPI aware. High DPI will soon become an issue to applications that are not ready. The first version of CSED was not and I was having artifacts, and drag and drop of files didn't work properly. Text was also slightly fuzzy.

Even Firefox did not worked fine with some web sites, such the PB Forum, and have been using Opera for a while. Fortunately, the new Firefox 4 works fine and is again my favorite browser.
Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on April 03, 2011, 05:24:50 PM
Lynx is for sure a great program and generosity of Paul to release it as source code was awesome.
Every programmer editor should have a Lynx like code browser.

In my editor (thinAir) I opted for a personalized code browser mainly to be free to tailor it as I wanted and it is becoming one the the key point.

What surprised me is that even PB10 editor still does not has something similar to Lynx but instead they opted for a modal window that is better than nothing but not so useful
If you can influence into PB world you should convince PB team to improve PBEdit transforming current "Code Finder" modal utility into something like Lynx

Ciao
Eros

Title: Re: JellyFish + Lynx and PB10
Post by: José Roca on April 03, 2011, 06:51:27 PM
Quote
PBCC support added (hope it works with PBCC 6 because I do not have so I was not able to test it)

It works.

I will have to reduce the size of the dialog because is too high for my settings. See attached picture.
Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on April 03, 2011, 07:16:59 PM
Updated my previous post with reduced global options dialog height

I will rearrange fields a little bit in order to gain some more pixels
Maybe the best would be to have a panel with scrollbars. I will see what I can do for future versions.

I will also study how Lynx parser is done in order to add more parsing features like classes.

Ciao
Eros
Title: Re: JellyFish + Lynx and PB10
Post by: José Roca on April 03, 2011, 07:46:34 PM
 
Thanks, it will suffice for now.

I just want to warn you that your approach to deal with High DPI isn't correct for Vista and Windows 7. In these OSEs, GetDeviceCaps always returns 96 unless you make the application High DPI aware using a manifest that includes


   <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
    ...
     <asmv3:application>
       <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
        <dpiAware>true</dpiAware>
       </asmv3:windowsSettings>
     </asmv3:application>
    ...
   </assembly>


or call the API function SetProcessDPIAware.

Read this MSDN article: http://msdn.microsoft.com/en-us/library/ms969894.aspx

But we will have time to discuss it after the more important stuff is working.
Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on April 03, 2011, 07:50:56 PM
I just follow previous programming technique.
But you are right. If Lynx has to remain with us we need to adapt it to more modern OS and programming.

Title: Re: JellyFish + Lynx and PB10
Post by: José Roca on April 03, 2011, 08:10:12 PM
There is another problem: You're using 615 pixels for the height, and this is too high for some resolutions.
Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on April 03, 2011, 08:21:00 PM
Ok, during next week I will try to add a more convenient way to handle compiler options using a scrolling panel or maybe a property list.
I have both controls developed so it should be easy to add one of the two. Maybe a scrolling panel is better so it will maintain original Lynx look and feel.

Title: Re: JellyFish + Lynx and PB10
Post by: Frank Kelley on April 04, 2011, 02:42:04 AM
Jose & Eros:

Thank you for fixing the error reporting in Lynx, your work is appreciated.

I notice that when compiling from Lynx and an error occurs, the error is reported correctly, however when I click on the "Go to error" button I sometimes get an Error 76 (unable to load file). It appears there is a coding error that is getting an incorrect path to the source file that contains the error. For example, the correct path to my source file is:

D:\_ProgramClients\PhotoProject\PP\PhotoProcessor_source\PhotoProcessor.bas

Lynx is trying to open:

D:\_ProgramClients\PhotoProcessor_source\PP\PhotoProcessor_source\PhotoProcessor.bas

So somehow the actual path information is being corrupted in Lynx. If I close Lynx and compile directly from CSED or JellyFish, the correct path to the error is displayed.

Also, the Lynx rollup feature is not working on my machine. When Lynx starts only the title bar is displayed. I can get the screen to expand by right-clicking the title bar and choosing a value from the Resize menu, but the rollup feature is inoperative regardless of what setting I am using on the rollup selection button.

Thanks again for your efforts.
Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on April 04, 2011, 06:22:51 AM
Frank,

can you please attach here the compiler .log file when an error occurs so I can check it?

I will check the rollup feature, I didn't change anything about it so there must be something related to the fact we are compiling Lynx with PB10

Thanks
Eros
Title: Re: JellyFish + Lynx and PB10
Post by: Norbert Doerre on April 04, 2011, 09:34:36 AM
I'm also using Lynx together with JellyFish Pro since the beginning. There does nothing comparable exist for PB, especially if you are working on larger projects. But there exist in fact some inconveniences and kinks however because development of both seems to have been stopped since years.
Why have we to complain about third party editor tools?
It's a pity that PB developers were not able to produce a comfortably usable "window" for their by the way splendid compiler, which could be the best advertisement ever. I know what i'm writing about because i'm programming user friendly cad tools since 1975.
Title: Re: JellyFish + Lynx and PB10
Post by: Frank Kelley on April 04, 2011, 02:23:15 PM
Hi, Eros:

I've attached the PB10 log file, as you requested. It appears the log file is returning short path names. The full, long path name is actually:

D:\_ProgramClients\PhotoProject\PP\PhotoProcessor_source\PhotoProcessor.bas

and the PB10 log file is returning:

D:\_PROGR~1\PHOTOP~1\PP\PHOTOP~1\PhotoProcessor.bas

The duplicate "PHOTOP~1" (shortening both "PhotoProject" and "PhotoProcessor" into identical tokens) could be part of the issue.

Thanks to you and Jose for all your work on this. I understand that Paul Noble (the original author of Lynx) is no longer programming in PowerBASIC, so you guys are really performing a great service.

ADDED:  I should point out that this was a deliberately induced error as part of my testing. When compiling from within Lynx and running CSED, getting an error and clicking "Go to error" produces an Error 76. When compiling from within Lynx and running JellyFish Pro, clicking "Go to error" opens a "bogus" new file (blank) that has the same name as the source file but a different path. Confusing, isn't it?
Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on April 04, 2011, 03:14:19 PM
Thanks Frank, I will have a look.

In my Lynx understanding it seems Lynx uses short paths when:

Can you be so kind to check in registry and tell me if PB10 path is correct?
Check under:
HKEY_CURRENT_USER\Software\PowerBASIC\PB/Win\10.00\Compiler
and then check that PB10 compiler path correspond to your actual one.

Thanks a lot
Eros
Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on April 04, 2011, 03:22:58 PM
Quote from: Frank Kelley on April 04, 2011, 02:42:04 AM
Also, the Lynx rollup feature is not working on my machine. When Lynx starts only the title bar is displayed. I can get the screen to expand by right-clicking the title bar and choosing a value from the Resize menu, but the rollup feature is inoperative regardless of what setting I am using on the rollup selection button.

Found the problem, found also a work around but not able to understand why it is behaving in this way.
The following code (present in Lynx.inc, Subs RollUp and RollDown) is the code used to re-size Lynx window when rollup is active. It seems this code is no longer working:
  'Determine the topmost style to use...
  IF guApp.TopMost THEN mZStyle = %HWND_TOPMOST ELSE mZStyle = %HWND_NOTOPMOST

  'Roll up the window...
  IF guApp.Animate = 0 THEN

    SetWindowPos hWnd, mZStyle, uRect.nLeft, _
                                uRect.nTop,  _
                                uRect.nRight - uRect.nLeft, _
                                mTinyHeight, _
                                %SWP_NOZORDER
....
  END IF


If I change the above code into the following all is working again:
  'Determine the topmost style to use...
  IF guApp.TopMost THEN mZStyle = %HWND_TOPMOST ELSE mZStyle = %HWND_NOTOPMOST

  'Roll up the window...
  IF guApp.Animate = 0 THEN

'---EOlmi start
    Dialog Set Size hWnd, _
                          uRect.nRight - uRect.nLeft, _
                          mTinyHeight

'    SetWindowPos hWnd, mZStyle, uRect.nLeft, _
'                                uRect.nTop,  _
'                                uRect.nRight - uRect.nLeft, _
'                                mTinyHeight, _
'                                %SWP_NOZORDER
'---EOlmi End


I think SetWindowPos under Win Vista or above has new security issues that I do not know ATM.
Maybe José can help understanding why it is failing.

Eros
Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on April 04, 2011, 04:06:22 PM
Updated Lynx attached in my previous post (I will keep only one copy):

http://www.jose.it-berater.org/smfforum/index.php?topic=4057.msg13942#msg13942

Changes:

Eros
Title: Re: JellyFish + Lynx and PB10
Post by: José Roca on April 04, 2011, 04:32:05 PM
Quote
I think SetWindowPos under Win Vista or above has new security issues that I do not know ATM.
Maybe José can help understanding why it is failing.

Sure. It's quite simple.

Change


LOCAL mZStyle     AS LONG


to


LOCAL mZStyle     AS DWORD


Too many people don't give importance to declaring variables, equates and parameters as the appropriate type.

If you declare the variable as LONG and the equate as -2 instead of &HFFFFFFFE??? and the parameter of SetWindowPos as LONG, instead of DWORD, it works, but when you use the right declares then it fails.

P.S. Avoid to use DDT statements with SDK windows. It may backfire one day.
Title: Re: JellyFish + Lynx and PB10
Post by: Eros Olmi on April 04, 2011, 04:57:21 PM
Thanks José.

Code fixed and attached again at:
http://www.jose.it-berater.org/smfforum/index.php?topic=4057.msg13942#msg13942

Will wait Frank about compiling problems.
Title: Re: JellyFish + Lynx and PB10
Post by: Frank Kelley on April 05, 2011, 02:51:51 AM
Downloaded the latest build (thanks, Eros!) and the rollup problem has been fixed.  On my machine, in the rolled up position I get the Lynx title bar and about half of the menu, so the roll up doesn't quite roll up all the way.  But this is a minor issue, just having the rollup working is good enough.

I checked the registry on my machine and the path to PBWin 10 is correct: C:\PBWin10\bin\PBWin.exe

When I create a deliberate error in my code in CSED and then try to compile from within Lynx, I get the correct error message #414 (I've left off a closing parenthesis):

"")" expected
  Line 654:   gRosterFile$ = GetIni(gIniFile$, "Selection", "LastRoster", ""          ' Get last roster file "

However, when I click the "Go to error" button I get an error #76 "Unable to Open File" from CSED. Lynx is trying to open the file:

D:\_ProgramClients\PhotoProcessor_source\PP\PhotoProcessor_source\PhotoProcessor.bas

When the actual path is:

D:\_ProgramClients\PhotoProject\PP\PhotoProcessor_source\PhotoProcessor.bas

If I perform the same steps using Lynx and JellyFish Pro, JellyFish will open a new (empty) file with the incorrect file name. Either way we do not go to the error location.

If I compile from within CSED or JellyFish without Lynx running, error message and cursor positioning at the error point work correctly.

Hope this information helps.
Title: Re: JellyFish + Lynx and PB10
Post by: Frank Kelley on April 12, 2011, 03:12:51 PM
Just a follow-up:

In testing, I've found if you have a "simple" path to the source code, the Lynx error I've described doesn't occur. For example, if the path is:

D:\MyProgram\MyProgram_source\MyProgram.bas

Lynx correctly responds to the "Go to error" button...it takes you right to the error every time. But if your path repeats a folder, things don't go well. This path will cause a problem for Lynx's go to error feature:

D:\MyProgram\MyProgram_source\MP\MyProgram_source\MyProgram.bas

The string "MyProgram_source" is repeated, and for some reason Lynx doesn't like this. I suspect it could be due to the use of short path names, but my solution is to not repeat any folders in the path.
Title: Re: JellyFish + Lynx and PB10
Post by: Frank Kelley on June 05, 2011, 05:20:11 PM
In working with Lynx today (creating a new project), I noticed that when I selected Options > Project Settings from the Lynx menu, then select "Run tool before compiling" to set those options, the pop-up Tool Selector dialog was completely off my screen. I could not see or select it and the only way to regain control of the Project Settings dialog was to press Escape.

Examining the Lynx INI file, the coordinates for the Tool Selector dialog were something like x=2567 y=3690. I reset these to 25, 36, saved the INI file and restarted Lynx. The Tool Selector was now visible on my screen. However, each time I close the Tool Selector dialog, it appears the pixel height and width of the Tool Selector are being added to the x/y coordinates in the INI file. This causes the dialog (on subsequent openings) to move down and to the right until it again ends up completely off the screen.

The only fix for this is to manually relocate the Tool Selector dialog to the area of the upper left corner of the screen before closing it. If I forget to do this it will eventually again creep off the screen, requiring another visit to the INI file to readjust the coordinates.

As I don't normally make that many trips to the Tool Selector dialog, I hadn't noticed this before. It only became apparent when I created three new projects in short order, setting the Tool Selector options for each one. None of the other Lynx dialogs appear to have this problem.
Title: Re: JellyFish + Lynx and PB10
Post by: Paul Breen on July 12, 2011, 03:27:34 PM
I would like to extend my appreciation for reviving Lynx so we do not have to use the powerbasic ide except for debugging. Well done.

Title: Re: JellyFish + Lynx and PB10
Post by: Fredrick Ughimi on July 24, 2012, 12:08:21 AM
Hello,

Lynx is not working for me. Don't what I am doing wrong. Its been a long while since I used it last. I think with PBWin7. Since I am curently using PBForms/PBEdit10 now, just thought be great to add lynx to the mix.

>>If you can influence into PB world you should convince PB team to improve PBEdit transforming current "Code Finder" modal utility into something like Lynx

Seconded.

Title: Re: JellyFish + Lynx and PB10
Post by: Fredrick Ughimi on July 24, 2012, 12:37:59 AM
Hello,

Whenever I click to navigate it opens the project in a new PBWin10 IDE.

Does JellyFishPro works with PBForms?
Title: Re: JellyFish + Lynx and PB10
Post by: Fredrick Ughimi on July 24, 2012, 12:48:22 AM
Navigation works well with JellyFishPro.