Page 1 of 1

Clipper Code under FiveWin ?

PostPosted: Tue Dec 10, 2019 6:19 am
by Jimmy
hi,

i try to compile Clipper Source with FiveWin, is this possible :?:

now it run until @ 8,0 SAY

Code: Select all  Expand view
3972 nMidScreen := 8 + INT( ( ( MAXROW() - 2 ) - 8 ) / 2 )
3973 SETCOLOR( 'w+/b' )
3974 CLEAR SCREEN
3975 DISPBOX( 0, 0, 8, MAXCOL() )
3976 DISPBOX( 8, 0, nMidScreen, MAXCOL() )
3977 DISPBOX( nMidScreen, 0, MAXROW() - 2, MAXCOL() )
3978 @  8,  0               SAY '├'


Application
===========
Path and name: C:\fwh\samples\3\CLICK2.exe (32 bits)
Size: 4,183,552 bytes
Compiler version: Harbour 3.2.0dev (r1904111533)
FiveWin version: FWH 19.06
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200

Time from start: 0 hours 4 mins 51 secs
Error occurred at: 12/10/19, 06:58:41
Error description: Error BASE/1004 No exported method: NCLRTEXT
Args:
[ 1] = U

Stack Calls
===========
Called from: => NCLRTEXT( 0 )
Called from: .\source\classes\SAY.PRG => TSAY:NEW( 81 )
Called from: c:\fwh\samples\3\CLICK2.prg => MAIN_SCREEN( 3978 )
Called from: c:\fwh\samples\3\CLICK2.prg => STARTCLICK( 388 )
Called from: c:\fwh\samples\3\CLICK2.prg => MAIN( 137 )

Re: Clipper Code under FiveWin ?

PostPosted: Tue Dec 10, 2019 11:36 am
by Silvio.Falconi
you cannot use clipper command on fw

Re: Clipper Code under FiveWin ?

PostPosted: Tue Dec 10, 2019 1:02 pm
by ukoenig
change to :

LOCAL oSay // on top

@ 8, 0 SAY oSay PROMPT '├'

regards
Uwe :D

Re: Clipper Code under FiveWin ?

PostPosted: Tue Dec 10, 2019 1:29 pm
by MOISES
Hello,

Use samples/build test.prg to create a DOS .exe app.

Re: Clipper Code under FiveWin ?

PostPosted: Tue Dec 10, 2019 8:40 pm
by Jimmy
hi
MOISES wrote:Use samples/build test.prg to create a DOS .exe app.

thx for help but i got a Error when try it
Error: Unresolved external '_HB_FUN_MSGINFO' referenced from C:\FWH\SAMPLES\TEST.OBJ
Error: Unable to perform link

Re: Clipper Code under FiveWin ?

PostPosted: Tue Dec 10, 2019 8:41 pm
by Jimmy
ukoenig wrote:change to :
LOCAL oSay // on top
@ 8, 0 SAY oSay PROMPT '├'

ooooh ... that will be much work to change all lines ...
is there a Way to use #xtranslate to get that Syntax :?:

Re: Clipper Code under FiveWin ?

PostPosted: Wed Dec 11, 2019 11:17 am
by MOISES
Please instead of test use your prg

Re: Clipper Code under FiveWin ?

PostPosted: Wed Dec 11, 2019 1:47 pm
by nageswaragunupudi
Clipper programs can not be directly compiled and built with FWH directly without any changes. We need to use Windows/Dialogs and use FWH syntax which is similar to clipper syntax but not exactly the same.

Recently we tried in a limited way how far we can make old Clippper syntax work.
Test this example:
Code: Select all  Expand view
#include "fivewin.ch"

function Main()

local n := 200
local c := "Hello    "

 CLEAR

 @  5,  2 SAY 'This is Prompt'
 @  5, 10 GET n
 @  8,  2 SAY "ENTER"
 @  8, 10 GET c

 READ

 ? n, c

return nil
 


Copy to fwh\samples folder and build with buildh.bat

Image

Re: Clipper Code under FiveWin ?

PostPosted: Wed Dec 11, 2019 3:47 pm
by nageswaragunupudi
Now, let us try the code posted first:

With minor modifications:

1) Added translate for DISPBOX
2) Changed CLEAR SCREEN as CLEAR //SCREEN .. commented out SCREEN
3) Text of say is made a long text


Code: Select all  Expand view
#include "fivewin.ch"

#xtranslate DISPBOX( <t>,<l>,<b>,<r> ) => TGroup():New( <t>, <l>, <b>, <r>, NIL, nil, nil, nil, nil, nil, nil, .t. )

function Main()

   local nMidScreen

   nMidScreen := 8 + INT( ( ( MAXROW() - 2 ) - 8 ) / 2 )
   SETCOLOR( 'w+/b' )
   CLEAR //SCREEN
   DISPBOX( 0, 0, 8, MAXCOL() )
   DISPBOX( 8, 0, nMidScreen, MAXCOL() )
   DISPBOX( nMidScreen, 0, MAXROW() - 2, MAXCOL() )
   @  8,  0 SAY '+CLIPPER SYNTAX IN FWH'

   READ

return nil
 

Image

Re: Clipper Code under FiveWin ?

PostPosted: Thu Dec 12, 2019 3:06 am
by Jimmy
hi,

thx for help.

i agree that Clipper Code is very old but it still work for me with my Xbase++ Code.
i have made a GUI Version in Xbase++ and harbour/HMG but not with FiveWin yet.

i tought Fivewin can use Clipper Code as "Console" that why i try it and got that Message.
i will learn how GUI under FiveWin work. it use OOP which i also use in Xbase++.

Re: Clipper Code under FiveWin ?

PostPosted: Thu Dec 12, 2019 3:10 am
by Jimmy
hi,
MOISES wrote:Please instead of test use your prg

i will do it when i finish FiveWin Version.
GUI Part now is for harbour / HMG so it will not work under FiveWin and Console Mode was just a try

Re: Clipper Code under FiveWin ?

PostPosted: Thu Dec 12, 2019 10:14 am
by hua
Jimmy wrote:
i agree that Clipper Code is very old but it still work for me with my Xbase++ Code.
i have made a GUI Version in Xbase++ and harbour/HMG but not with FiveWin yet.

i tought Fivewin can use Clipper Code as "Console" that why i try it and got that Message.
i will learn how GUI under FiveWin work. it use OOP which i also use in Xbase++.


If you want to build console program, you just need to compile and link with [x]Harbour. You link in FWH only if you want windows GUI.
Try googling GTWVT or GTWVG for more info. I didn't experiment much with windows console program

Re: Clipper Code under FiveWin ?

PostPosted: Thu Dec 12, 2019 5:36 pm
by Jimmy
hi,
hua wrote:If you want to build console program, you just need to compile and link with [x]Harbour. You link in FWH only if you want windows GUI.
Try googling GTWVT or GTWVG for more info. I didn't experiment much with windows console program

thx for Answer.

my working harbour HMG Version is using GTWVT but it is "so slow" ... so i wanted to try other Console
i know GTWVG from Pritpal Bedi while it have same Syntax like Xbase++ but i never have made a GUI Version of CLICK with Xbase++.

---

that Clipper Soure was just a Test.
i have not used Console since Years but someone in HMG Forum ask for "Formatter for Clipper" so i try to rebuild my CLICK Source under harbour / HMG. it run but "Output" under harbour /HMG make App extrem slow. :shock:

without "Output" it use < 4 Seconds but with "Output" it take Minutes :!:

Re: Clipper Code under FiveWin ?

PostPosted: Fri Dec 20, 2019 9:06 am
by Antonio Linares
Dear Jimmy,

Could you please post some screenshots of your app using GTWVT ?

Does it look nice ? Is the output speed the only problem ?

many thanks

Re: Clipper Code under FiveWin ?

PostPosted: Fri Dec 20, 2019 9:20 pm
by Jimmy
hi Antonio,
Antonio Linares wrote:Could you please post some screenshots of your app using GTWVT ?
Does it look nice ? Is the output speed the only problem ?

i have not made a Snapshot from GTWVT Version but it look exact like my Xbase++ Console
Image

i have to say that every "Output" is slow. GTWVT is not slower than Xbase++ Console.

GTWVT "Event-Loop" is just INKEY() and with HMG i can use GUI too e.g. Button.
this is what i don't know with FiveWin while GUI Parts seems all Inherit from TWindows.

HMG use Procedure and Function with #xCommand Syntax so i had to "go back" to Cl*pper Style using Macro.
FiveWin use OOP which make it more easy for me while i have work last 15 Year with that Style.

as i can say GTWVT is a good Console Solution but i can't say if Events will work well with OOP Style.