• Welcome to Jose's Read Only Forum 2023.
 

JellyFish + Lynx and PB10

Started by Eros Olmi, March 29, 2011, 11:07:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

José Roca

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.

Eros Olmi

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
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

José Roca

 
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.

Eros Olmi

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.

thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

José Roca

There is another problem: You're using 615 pixels for the height, and this is too high for some resolutions.

Eros Olmi

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.

thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Frank Kelley

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.

Eros Olmi

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
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Norbert Doerre

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.
Ing.-Buero Doerre (IBD)
Dipl-Ing. TH Norbert Doerre
Elpenbachstr. 63 - 65
46119 Oberhausen,  Germany
Technical Hard- and Software
Computer Forensic

Frank Kelley

#24
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?

Eros Olmi

Thanks Frank, I will have a look.

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

  • compiler is 16bit (old PB)
  • compiler path is not found in Registry
  • someone changed registry PB path by manual and it does not correspond to actual one
  • you moved manually your PB install directory and it does not correspond to registry one

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
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Eros Olmi

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
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Eros Olmi

#27
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:

  • possibly fixed rollup option
  • in case Lynx is not able to find PB compiler path into registry a message box will appear with some info. At that point it will be possible at least the originating problem

Eros
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

José Roca

#28
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.

Eros Olmi

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.
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB