fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Sample of a migrated VO application

Sample of a migrated VO application 2 years 4 months ago #1102

  wriedmann's Avatar Topic Author wriedmann Offline Posts: 1567
For a few days I'm now using my FTPExplorer application in its X# version.

This application is an evolution of the VO FTPExplorer sample with several additions like resizeable window.
I have moved this application to Vulcan.NET a few years ago, and now it is a X# application using the Vulcan.NET runtime libraries.

To show you how such an application feels you will find different files in the attached zip archive:
- the X# compiled exe
- a VIAEF file with the complete sources in XIDE format - simply startup XIDE and import this file in anyone of your projects.
- a Vulcan compiled exe with the needed runtime DLLs

But be warned: this code is not well written code you should take as example - take it as example how old code with errors and bad style can continue to run in a X# version.
And this application originally was built in a multilingual version, but the code you find attached contains only the german language.

Changed February, 6 2017 17:21: fixed a runtime error when resizing
Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by wriedmann. Reason: corrected runtime error

Sample of a migrated VO application 2 years 4 months ago #1125

  FFF's Avatar FFF Offline Posts: 574
Wolfgang,
got the files. ...Vulcan.exe works, but the X-exe crashes when i try to change the shell size by mouse. Imported the aef, Xide complains about missing AFTPICO Icon "aFtpIco.ico". Took any icon file, renamed. Compiled then in XIDE, but result of resize is the same...

BTW, 303 warnings re "double define" is not so nice ;)- @Chris: any chance to let the error pane provide a means to actually SEE where the second define hides? A Ctrl-Shift-F shows only the define in Win32Api.

Please Log in or Create an account to join the conversation.

Sample of a migrated VO application 2 years 4 months ago #1126

  wriedmann's Avatar Topic Author wriedmann Offline Posts: 1567
Hi Karl,

I will look into the resize issue.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

Sample of a migrated VO application 2 years 4 months ago #1127

  Chris's Avatar Chris Offline Posts: 1163
Hi Karl,

That's strange, I just run the x# version and it's looking good. Try running it through the debugger, do you get an error message?

About the double defines, this is one of the main reasons why we want to start fresh in x# with the SDK from VO and get rid of such problems due to the way the SDK was ported to vulcan. It's the duplicate defines in VOGUIClasses.vh and VOWin32APILibrary.vh that cause the warnings, vulcan reports those warnings as well. Of course you can disable them by using /nowarn:9012,9013

In order to see those defines with the find dialog, you need to make the .vh files part of the project/app, with Add files.

Chris
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Sample of a migrated VO application 2 years 4 months ago #1128

  FFF's Avatar FFF Offline Posts: 574
You say, you use the FTP_Explorer.exe as in Wolfgang's zip, start it and resize the form without crash? Strange. For me, "bang"...

Just tried anew from XIDE, same result:
Problemereignisname: CLR20r3
Problemsignatur 01: FTP_Explorer_X_KF.exe
Problemsignatur 02: 1.3.15.0
Problemsignatur 03: 58989cb7
Problemsignatur 04: VulcanRTFuncs
Problemsignatur 05: 4.0.401.0
Problemsignatur 06: 55db3e1f
Problemsignatur 07: 735
Problemsignatur 08: 2f
Problemsignatur 09: Vulcan.Error
Betriebsystemversion: 6.3.9600.2.0.0.256.103
Gebietsschema-ID: 1031
Zusatzinformation 1: 2e9c
Zusatzinformation 2: 2e9c4ccdba018f8bd7c5d1f7f329027a
Zusatzinformation 3: 7e68
Zusatzinformation 4: 7e68d5a5c9af26372a92f667918896e5

Karl

Please Log in or Create an account to join the conversation.

Sample of a migrated VO application 2 years 4 months ago #1129

  wriedmann's Avatar Topic Author wriedmann Offline Posts: 1567
Hi Karl,

on resizing it crashes on my system too.... But your error message strangely references .NET 2 (CLR20r3) and not Framework 4.

But I have managed to fix the error. This was the original code:
method Dispatch( oEV ) 
  local wParam as dword
  local sRect as _winRect

  if oEv:Message == WM_SIZING .and. _oMinimSize != null_object
    sRect := ptr( _cast, oEv:lParam )

Change it to
method Dispatch( oEV ) 
  local wParam as dword
  local sRect as _winRect
  local oEvent as Event

  if oEv:Message == WM_SIZING .and. _oMinimSize != null_object
    oEvent := oEv
    sRect := ptr( _cast, oEvent:lParam )

and it will work.

Maybe such a cast should be result in a compiler error (try to cast an usual).

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

Last edit: by wriedmann.

Sample of a migrated VO application 2 years 4 months ago #1130

  wriedmann's Avatar Topic Author wriedmann Offline Posts: 1567
Hi Karl, hi Chris,

I have now fixed this and a similar issue in another Dispatch() method and uploaded a new archive.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

Sample of a migrated VO application 2 years 4 months ago #1132

  FFF's Avatar FFF Offline Posts: 574
Wolfgang,
yeah, saw the CLR issue, too. But Xide says, the aef to be V4.0, as are the referenced VN-libs.

Re dispatch: which one, please? I knew i preferered for a reason VO syntax ;)
Found it, replaced and now no crash anymore...

Please Log in or Create an account to join the conversation.

Sample of a migrated VO application 2 years 4 months ago #1133

  FFF's Avatar FFF Offline Posts: 574
Still no icon file ;(

Please Log in or Create an account to join the conversation.

Sample of a migrated VO application 2 years 4 months ago #1134

  Chris's Avatar Chris Offline Posts: 1163
Hi Wolfgang % Karl,

This problem with casting the lparam to a VOSTRUCT was found and fixed in the compiler just a few days ago, so the code works correctly without changes now. If you guys would like to use the newer compiler build, please let me know and I'll send it to you.

This is (in part) why I was not seeing the error before, but it seems to be also an OS thing, as neither running the original .exe was causing a crash here!

Chris
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Sample of a migrated VO application 2 years 4 months ago #1135

  FFF's Avatar FFF Offline Posts: 574

Chris Pyrgas wrote: ... If you guys would like to use the newer compiler build, please let me know and I'll send it to you.Chris

Sure. While i'm certainly no big coder, sometimes i think i have a nick for stumbling over little things which escape the bigger guys ;)

Please Log in or Create an account to join the conversation.

Sample of a migrated VO application 2 years 4 months ago #1136

  wriedmann's Avatar Topic Author wriedmann Offline Posts: 1567
Hi Chris,

the last year I have started to "fix" any event method I see in my old VO code "casting" the oEvent object like this one by assigning the untyped parameter to a typed local variable.

I don't think I need a new compiler version because I will not work on other VO migrations for a month or so, I think.

Wolfgang

P.S. today one of my most important customers has asked me if I have the possibility to move their main ERP software (written in VO) over to the .NET framework, and later to WPF.
Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

  • Page:
  • 1