rathinagiri wrote:Super! Thanks a lot Francesco. I am now working on virtual grid (using TableView).
Hi Rathinagiri,
me and Luigi are cooperating on a small test project: he writes some form code in HMG-3 and then we try to compile in HMG-4 and try to get the same results.... so we discovered that compatibility layer is incomplete...
we'd like to make a proposal.
hmg.ch contains only #define valid for everything.
if you write your code using "with object...." you only need that file
hmg4.ch contains the compatibility layer (and includes hmg.ch) for extended syntax. please beware ! there are 2 or 3 different alternate syntax:
1a)
DEFINE WINDOW oForm TYPE WND_MAIN // all on one line
1b)
DEFINE WINDOW oForm ;
TYPE WND_MAIN // on two lines but it actually is like the one above, it's one line for the preprocessor
2)
DEFINE WINDOW oForm
TYPE WND_MAIN // on two lines and 2 lines for the preprocessor...
3) only for some objects
@ .....
type 1a, 1b (and 3) need complex preprocessor directives:
#xcommand DEFINE WINDOW <o> [TYPE <x>] => with object <o> := new():window() ; [ :nType := <x> ]
and there may be different variants (have a look at different DEFINE TOOLBAR)
type 2 need separate directives:
#xcommand DEFINE WINDOW <o> => with object <o> := new():window()
#xcommand TYPE <x> => :nType := <x>
I'd call EXTENDED SYNTAX type 1 and 3, ONELINER SYNTAX type 2...
We also found a problem: when using extended syntax, if the converted code contains the IF statement, preprocessor stops translating... I'll post to harbour developer list to see if a problem of the developer or if we want to do things not possible to do
What I ask now to all core developers:
for the code you have developed, please have a look if all the EXTENDED and ONELINER SYNTAX are present.
If present but not implemented (you only save the value but do nothing with it) please issue a msginfo() or a hb_tracestring() so that developers using that feature know immediately that it won't work...
Luigi created some more #xcommand I will commit later today.