Saturday, February 19, 2011

Simple Usage of gtWVT

What is gtWVT ?

gtWVT is the  GT driver for MS-Windows (Win 95 and higher) and was contributed to Xharbour on 22nd December 2003 by Peter Rees

It creates its own GUI window instead of using MS-console window. It allows to changes to font, window size, etc.

gtWVT is a pure console implementation of traditional Clipper terminaltaking Windows API as its base console IO protocols. Its OI are  rendered in a Windows window and hence all of MSDN is available  for use with GTWVT.


Simple Usage in Harbour/xHarbour

Incredibly as it may seems, just adding -gtwvt to yourproject.hbp and then hbmk2 yourproject.hbp will allow your newly recompiled CA-Clipper Codes (as Harbour Codes) to run  as a true 32-bits application to run in its own GUI window rather than the awkward Command Prompt Window :-)

gtWVT also supports  additional functionality with hb_gtInfo() interface. You may want to check out harbour\include\hbgtinfo.ch :-)

Friday, February 18, 2011

What is installed by the Nightly Builds of Harbour 2.1 ?

Supported  Platforms
x86, x64, WinCE/ARM, MS-DOS, OS/2, Linux target platforms.

Installation Size
Installed size: 214MB (54MB - 339MB)

What is actually Installed ?
The default installation will install MinGW compiler + x86 static and
shared libs, MSVC and BCC x86 libs and examples.

Options: x86 shared tools, x64 shared tools, MinGW x64 and WinCE-ARM libs, MSVC x64 libs, Open Watcom x86 libs,shared x64/WinCE-ARM libs, MS-DOS (watcom) libs, OS/2 (watcom)libs, Linux (watcom) libs.

How to Use ?
1) install/unpack to any directory (C:\hb21)
2) go to bin dir (optional if you specify path for hbmk2)
3) For x86 executable, type: 'hbmk2 ../tests/hello.prg'
4) For x64 executable, type: 'hbmk2 ../tests/hello.prg -compiler=mingw64'
   [needs mingw64 to be installed in 'comp/mingw64' dir beforehand]
5) For WinCE/ARM executable, type: 'hbmk2 ../tests/hello.prg -platform=wce'
   [needs cegcc to be installed in 'comp/mingwarm' dir beforehand]
6) For MS-DOS executable, type: 'hbmk2 ../tests/hello.prg -platform=dos'
   [needs OpenWatcom to be installed in 'comp/watcom' dir beforehand]
7) For Linux executable, type: 'hbmk2 ../tests/hello.prg -platform=linux'
   [needs OpenWatcom to be installed in 'comp/watcom' dir beforehand]

CA-Compiler - Arguments Listing & Compiler Options

CA-Clipper Compiler--CLIPPER.EXE
 Compiles one or more program files (.prg) containing procedures and user-
 defined functions to form an object file (.OBJ).
------------------------------------------------------------------------------

 CLIPPER [<sourceFile> | @<scriptFile> [<option list>]]
   
 Arguments

<scriptFile> is the name of an ASCII text file containing a list of
     source files to compile into a single object file.  The default
     extension for this file is (.clp).

     <option list> is a list of one or more options to control the course
     of the compilation, all of which are described below.  To get a list of
     options, specify the compiler command line with no arguments.

 Compiler Options

     All options are shown in uppercase preceded by a slash (/).  Note,
     however, that options are not case-sensitive and that you can replace
     the slash with a dash (-) if you prefer.

     Some compiler options have arguments.  If an option has arguments,
     specify them after the option, with no space between the option and
     its first argument.

     /A

     Declares any variable included in a PRIVATE, PUBLIC, or PARAMETERS
     statement as MEMVAR.

     /B

     Includes debugging information in the object file.

     /D[=]

     Defines an identifier to the preprocessor with  assigned to the
      if specified.

     /ES[]

     Specifies the severity level of warnings.

     If  is 0 or omitted, the compiler does not set the DOS
     ERRORLEVEL upon exit if warnings are encountered.  This is the default
     behavior of the compiler.

     If  is 1, the compiler sets the DOS ERRORLEVEL upon exit
     if warnings are encountered but still generates an .OBJ file.

     If  is 2, the compiler sets the DOS ERRORLEVEL upon exit
     if warnings are encountered and does not generate an .OBJ file.  This
     effectively promotes warnings to error status.
     /I

     Adds the specified directory to the front of the INCLUDE path list.
     Multiple /I options can be specified in the same compiler session to
     specify several header file search directories.

     /L

     Excludes the program source code line numbers from the object file.

     /M

     Compiles only the current program file (.prg) suppressing automatic
     search for program files (.prg) referenced in a program file with the
     DO, SET FORMAT, and SET PROCEDURE commands.

     /N

     Suppresses the automatic definition of a procedure with the same name as
     the program file (.prg).

     /O

     Defines the name and/or location of the output object file.

     /P

     Preprocesses the program file (.prg) and copying the result to an output
     file with a (.ppo) extension.

     /Q

     Prevents line numbers from displaying while compiling.

     /R[]

     Embeds a library search request in the object file.  If /R is specified
     without  name, the default requests for CLIPPER.LIB,
     EXTEND.LIB, DBFNTX.LIB, and TERMINAL.LIB are suppressed.  Multiple /R
     options can be specified in the same compiler session to embed more
     than one library request.

     /S

     Checks the syntax of the current (.prg) file and no object file is
     generated.

     /T

     Specifies a different directory for temporary files generated during
     compilation.

     /U[]

     Identifies an alternate standard header file to preprocess in place of
     the supplied STD.CH which is used automatically.

     /V

     Forces the compiler to assume all references to undeclared or unaliased
     variable names are public or private variables.

     /W

     Generates warning messages for undeclared or unaliased (ambiguous)
     variable references.

     /Z

     Suppresses shortcutting optimizations on the logical operators .AND. and
     .OR.  This option is provided as an aid to isolating code that depends
     on the behavior of older versions of CA-Clipper.
 

More at http://www.itlnet.net/programming/program/Reference/c53g04c/ng35d.html

Thursday, February 17, 2011

How many changes since Harbour 2.0 ?

Recently, I downloaded hb2.1 and found that it does resolve some of the issues I faced in recompiling XHarbour apps circa 2006 to Harbour 2.0. For example, pressing ESC when in a memo field  DBEDIT() did not work in hb2.0 even when I made no changes.

Do you know how many changes that has been made since hb2.0 ? Would you believe that more than 3,000 changes have been made. Check out this excerpt of the response from Viktor on my request for hm to provide me a list of changes since hb2.0

Viktor - 16/1/2011
=============

Phew... for this I'd need to spend many long days to gather all changes (from ChangeLog) and translate them to some digestible terms. I had actually asked dev list members to do it, but there was barely any help.

In fact this job was not even finished for 1.0 -> 2.0 changes, there were so many of them. Now there are 3000 more changes since 2.0, so, it should be made community effort in some ways. I agree it's very good idea and very important to get such list.

CCH: Perhaps, I should start to wade through the ChangeLog and start posting on this blog :-)


Wednesday, February 16, 2011

Free xEdit IDE from xailer.com


From the News of Xailer.com  billed as the Ultimate Development Environment for Xbase

01-19-2011. New xEdit 2.2 version
New upgrade of our free development environment for [x]Harbour xEdit. Now with subprojects support. You may find further information on the downloads section.


Just downloaded the 2011 version of the free xEdit2 IDE (xeditsetup.exe) from http://www.xailer.com.

Installation was a breeze on my Windows 7 Home Premium Notebook but the  Desktop Shortcut did not appear :-)

1. Click New Project and presented with Project Properties

2. Tree-like project Properties covering
a)Main (Project Type, Description, Output File, Environment, Main Module)
- Empty pulldown for environment
- populated after Add file to Project

b) Look (inlclude XP Themes, Select Icon)
c)Version
d) Options
e) Libraries
f) Directories (Root, Source, Include, Resource, Object)

3) Click Projects/Add File to Project

4. Click Compile, no issue here

5. Click Run
- No error messages, no compile errors but no EXE created

6. Updated Tools\Programming Environment with Harbor 2.0/MinGW and updated Project Properties\Environment

7. Click Run
- No error messages, no compile errors but no EXE created

Hmm... I think I am missing something here :-)

Have emailed Xailer Forum/Google Group owners and awaiting reply.

As at 21st Feb 2011, still unable to create EXE using xEdit2, please refer to this thread :-(

More to come...

Harbour MiniGUI 1.9 Extended Edition (Build 93 Released on 16th Feb 2011

CCH: From the HMG Extended Forum
Hi All,

The Harbour MiniGUI 1.9 Extended Edition (Build 93) setup is published at the following URL:

http://hmgextended.com/files/CONTRIB/hmg-1.9-93-setup.zip

There is the following changelog for this build:

2011/02/16: Build 93 (HMG 1.9 Extended Edition) Published.
* Changed: Clipboard retrieve text function was renamed due to misspelled to
RetrieveTextFromClipboard()-->
cText - retrieve text from Windows clipboard
Reported by Kevin Carmody <i@kevincarmody.com>.
* Updated: Clipboard functions:
- New: Added function ClearClipboard();
- Updated: function RetrieveTextFromClipboard(). Borrowed from ooHG.
Contributed by Vladimir Chumachenko <ChVolodymyr@yandex.ru>
(see demo in folder \samples\Basic\CLIPBOARD).
* Updated: Grid/TextBox: minor cleaning of InputMask processing code.
Contributed by Grigory Filatov <gfilatov@inbox.ru>
(see demos in folder \samples\Basic\INPUTMASK)
* Updated: MiniPrint library (see source in folder \Source\MiniPrint):
- New: Added DOTTED clause in the PRINT LINE command.
Contributed by Grigory Filatov <gfilatov@inbox.ru>
(see demo in folder \samples\Basic\miniprint)
* Updated: Socket library source code by Matteo Baccan <baccan@infomedia.it>:
- Updated: date handling of method Send() in tsmtp.prg.
Problem was reported by Alen Uzelac <solvox@gmail.com>.
Contributed by Grigory Filatov <gfilatov@inbox.ru>
(see in folder \Source\Socket)
* Updated: HbSQLite3 library source code (see in folder \Source\HbSQLite3):
- update for using SQLITE3 version 3.7.5
Contributed by Grigory Filatov <gfilatov@inbox.ru>
* Updated: Adaptation FiveWin Class TSBrowse 9.0 in HMG:
- Added: Array vertical bar management in the Insert method.
- Fixed: Problem with using Ctrl+V / Shift+Insert hotkeys.
Bug was reported by Paolo Russignan <paolorus@yahoo.it>.
Contributed by Janusz Pora <januszpora@onet.eu>
(see demo in folder \samples\Advanced\Tsb_Array)
* Updated: HMG_QHTM library (see source in folder \Source\QHTM):
- New: Added function QHTM_EnableUpdate() - enable/disable redraw element of QHTM;
- New: Define QHTM now supports the fontname and fontsize attributes.
Contributed by Vladimir Chumachenko <ChVolodymyr@yandex.ru>
(look at changelog.txt in folder \Source\QHTM)
* Updated: Harbour Compiler 2.1.0rc1 (SVN 2011-02-15 09:21):
* Updated: HbSqlDD library source code (see in folder \Source\HbSqlDD);
* Updated: HbSQLite3 library source code (see in folder \Source\HbSQLite3);
* Updated: freeimage.lib update to 3.15.0 (from 3.9.3).
Contributed by Grigory Filatov <gfilatov@inbox.ru>
(look at ReadMe.txt in folder \harbour)
* Updated: HMGS-IDE v.1.0.6.1. Project Manager and Two-Way Visual Form Designer.
Contributed by Walter Formigoni <walter.formigoni@uol.com.br> and
Pete D. <pete_westg@yahoo.gr>
(look for whatsnew at changelog.txt in folder \Ide)
* New: 'HMG Grid' sample. Borrowed from HMG 4 project.
Adapted by Grigory Filatov <gfilatov@inbox.ru>
(see in folder \samples\Basic\Grid_Test)
* Updated: 'ADORDD' sample with using a TBROWSE control:
- Updated for compatibility with TSBrowse 9.0 syntax.
Problem was reported by Oscar Martin.
(see in folder \samples\Basic\ADORDD_4)
* Updated: Grid samples. Contributed by Grigory Filatov <gfilatov@inbox.ru>
(see demos in folder \samples\Basic\Grid)
* Updated: 'Get DIR List' sample.
Contributed by Grigory Filatov <gfilatov@inbox.ru>
(see in folder \samples\Basic\DirList)
* Updated: 'Multi Richedit' sample.
Requested by Marcelo A. L. Carli <malcarli@terra.com.br>.
Contributed by Janusz Pora <januszpora@onet.eu>
(see in folder \samples\Advanced\RicheditEx_2)

This release of MiniGUI is considered stable and ready for production use.

Your comments/feedback are welcome!

--
Best Regards,
Grigory Filatov
[MiniGUI Team]

How to compile a HMG application with hbmk2 ?

All along, I have always use HMG-IDE by Roberto Lopez to compile  Harbour Minigui  Win 32 apps. The process is actually simple. For example, all I needed to do was to create a project with the IDE and add  a list of the PRGs that needed to be compiled.

If the name of the project is FRS4HMG, frs4hmg.hbp will be created as follows :-

frs4hmg.hbp
=========
frs4w764.prg
lock.prg

By running the frs4hmg project, FRS4HMG.EXE is created

After discovering the versatility of hbmk2 and especially after successfully using hbmk2 to compile a gtWVG app, I was motivated to try the same with building a HMG app with hbmk2.

I took a look at the frs4hmg.hbp and noticed that there was no HMG libs at all. I then looked at the build.bat in the HMG root folder and was overwhelmed :-) As usual, I posted my issue at the HMG Forum and an Italian Member, Luigi was kind enough to walk me through and highlight that it was just impossible to do so with Harbour 2.1


Quote by Luigi

In addition, I have tried to compile HMG3 with the new version of the Harbour compiler but I got many warning with the option /w0 (with /w3, of course, does not generate the hmg library). The generation of an executable is, in any case, impossible for many mistakes: for example with hbmzip (used by Hmg).

frs4hmg.hbp (after looking at Luigi's feedback)
=========

-oFRS4HMG.exe
-prgflag= -w3 -es2 -gtgui
-cflag=-O3

-lhmg -lhbmzip -lhbwin -lhbct -lhbmisc -lxhb -lvfw32 -lmsvfw32

frs4hmg.hbc

frs4w764.prg
locks.prg

frs4hmg.hbc
=========

incpaths=c:\hmg\include
libpaths=c:\hmg\lib


I then hbmk2 frs4hmg.hbp but there were lots of undefined functions in lhmg etc.

Taking the cue, I changed the PATH under environmental variables in Win 7 to C:\hb20;Hb20\bin and

hbmk2 frs4hmg.hbp and bingo FRS4HMG.EXE was duly created !

Welcome to Clipper... Clipper... Clipper


In 1997, then using Delphi 3, I had already created 32-bits Windows applications for HRIS, ERP and CRM. In 2007, using Ruby on Rails, an AJAX powered CRM site running on Apache & MySQL was created and I am now using Visual Studio .Net 2008 to create web-based projects and Delphi 7 for Win32 applications using SQL2005 & DBFCDX.

So, why then am I reviving the Original Clipper... Clipper... Clipper via a Blog as CA-Clipper is a programming language for the DOS world ? Believe it or not, there are still some clients using my mission-critical CA-Clipper applications for DOS installed in the late 80's and up to the mid 90's. This is testimony to CA-Clipper's robustness as a language :-)

With the widespread introduction of Windows 7 64-bits as the standard O/S for new Windows based PCs & Notebooks, CA-Clipper EXE simply will not work and it has become imperative for Clipper programmers to migrate immediately to Harbour to build 32/64 bits EXEs

Since 28th January 2009, this blog has been read by 134,389 (10/3/11 - 39,277) unique visitors (of which 45,151 (10/3/11 - 13,929) are returning visitors) from 103 countries and 1,574 cities & towns in Europe (37; 764 cities), North America (3; 373 cities) , Central America & Caribeans (6; 13 cities), South America(10; 226 cities), Africa & Middle-East (12; 44 cities) , Asia-Pacific (21; 175 cities). So, obviously Clipper is Alive & Well : -)


TIA & Enjoy ! (10th October 2012, 11:05; 13th November 2015)


Original Welcome Page for Clipper... Clipper... Clipper

This is the original Welcome Page for Clipper... Clipper... Clipper, which I am republishing for historical and sentimental reasons. The only changes that I have made was to fix all the broken links. BTW, the counter from counter.digits.com is still working :-)

Welcome to Chee Chong Hwa's Malaysian WWW web site which is dedicated to Clipperheads throughout the world.

This site started out as a teeny-weeny section of Who the heck is Chee Chong Hwa ? and has graduated into a full blown web site of more than 140 pages (actually hundreds of A4 size pages) ! This is due to its growing popularity and tremendous encouragements from visiting Clipperheads from 100 countries worldwide, from North America, Central America, Caribbean, South America, Europe, Middle-East, Africa and Asia-Pacific. Thanx Clipperheads, you all made this happen !


What is Clipper ?

You may ask, what is this Clipper stuff ? Could Clipper be something to do with sailing as it is the name of a very fast sailing American ship in the 19th century ?

Well, Clipper or to be precise, CA-Clipper is the premier PC-Software development tool for DOS. It was first developed by Nantucket Corporation initially as a compiler for dBase3+ programs. Since then, CA-Clipper has evolved away from its x-base roots with the introduction of lexical scoping & pre-defined objects like TBrowse. As at today, the most stable version ofClipper is 5.2e while the latest version, 5.3a was introduced on 21 May 1996.

As at 11th November, 1996, an unofficial 5.3a fixes file was made available by Jo French. See the About CA-Clipper 5.3a section for more details. BTW, Jo French uploaded the revised 5.3a fixes file on 20th November, 1996.

Latest News

The latest news is that CA has finally released the long-awaited 5.3b patch on 21 May, 1997.

For 5.3b users, you must a take a look at Jo French's comments on unfixed bugs in 5.3b.

BTW, have you used Click ? If you're a serious Clipperprogrammer and need an excellent code formatter, Click is a natural choice. How to get it ? Simple, access Phil Barnett's site via my Cool Clipper Sites.

32-bits Clipper for Windows ?

Have you tried Xbase ++ ? Well, I have and compared to Delphi (my current Windows programming tool of choice), I'm still sticking to Delphi.

Anyway, you should visit the Alaska Home Page. Give it a chance and then draw your own conclusions !.

The Harbour Project

Is this the future of Xbase ? Take a look at at the Harbour Project

You are Visitor # ...

According to counter.digits.com, you are visitor since 3 June 1996.

If you like or dislike what you see on this website, please drop me a line by clicking the email button at the bottom of this page or better still, by filling out the form in my guest book. If you are not sure what to write,click here to take a look at what other Clipperheads have to say.