Page 1 of 2
Recompiling under HMG 3.0.35
Posted: Thu Aug 26, 2010 8:45 am
by CCH4CLIPPER
Hi All
Just downloaded 3.0.35 and tried recompiling an EXE which worked perfectly in June 2009.
I have noticed that *.hpj has been change to *.hbp... not an issue.
But, I am stuck with the following functions not supported
1. MSGINFO()
2. STRTRAN()
Any help will be appreciated
CCH
http://cch4clipper.blogspot.com
Re: Recompiling under HMG 3.0.35
Posted: Thu Aug 26, 2010 8:53 am
by mol
I've tried in my app strtran and msginfo and both of them link and work correctly.
You should look in your sources.
Marek
Re: Recompiling under HMG 3.0.35
Posted: Thu Aug 26, 2010 9:26 am
by CCH4CLIPPER
Hi Marek
Source :
FUNCTION Main(cFile, cSecondParam, cThirdParam, cFourthParam, cFifthParam, cCoy_CodeParam )
MsgInfo('Ready to print '+cFile)
Error Message
Error BASE/1081 Argument error : +
This code compiles perfectly in HMG 2.x
CCH
http://cch4cipper.blogspot.com
Re: Recompiling under HMG 3.0.35
Posted: Thu Aug 26, 2010 10:39 am
by mol
I'm out of office now, but, I think it is caused by missing main window definition. try to define main window as dummy
Re: Recompiling under HMG 3.0.35
Posted: Thu Aug 26, 2010 10:52 am
by CCH4CLIPPER
Hi Marek
A silly question, how does one define main window as dummy ?
Re: Recompiling under HMG 3.0.35
Posted: Thu Aug 26, 2010 10:57 am
by sudip
Hi CCH,
After a long time I see your post
Have you clicked on Project Menu -> Reset Project Incremental Data?
Or please check valtype(cFile)
I guess it's a Compile time error. If above mentioned solutions are not helpful, can you please send a small copy of your source code.
Thanks in advance

Re: Recompiling under HMG 3.0.35
Posted: Thu Aug 26, 2010 11:26 am
by mol
Have you called you app after compilation with parameter?
If not, you should test if cFile is passed, eg:
if type('cFile') == "C"
Msginfo('Ready to print '+cFile)
endif
Re: Recompiling under HMG 3.0.35
Posted: Thu Aug 26, 2010 12:18 pm
by esgici
Hello CCH4
Welcome back
I'm agree with Sudip and Marek; your MsgInfo() problem like a "type mismatch" error.
Another way for locate error, may be using MsgMulti() with a little syntax change :
MsgMulti( { 'Ready to print ', cFile } )
( MgsMulti() is a my humble contribution, you can find it in the forum )
STRTRAN() is a Harbour module, not HMG. May be required :
REQUEST STRTRAN
or please check your parameters sent to function; does they are correct type and sequence ?
Yes, .hpj extension changed to .hbp because we are using anymore hbmk2 of Harbour for building applications
Hearing you again is very nice, welcome again
Regards
--
Esgici
Re: Recompiling under HMG 3.0.35
Posted: Thu Aug 26, 2010 12:35 pm
by CCH4CLIPPER
Hi Marek/Sudip/Escigi
It looks as if the compilation via HMG 3 is much stricter in that it validates the value of cFile as if it is a runtime.
By addiing if valtype(cFile) == "C" wherever cFile is used solves the problem.
BTW, the resultant EXE is much faster than HMG2. I wonder whether it is due to HB2.0 being used
TQVM for the speedy response and making me feel welcome on this forum
Cheers
CCH
http://cch4clipper.blogspot.com
Re: Recompiling under HMG 3.0.35
Posted: Thu Aug 26, 2010 12:53 pm
by sudip
CCH4CLIPPER wrote:Hi Marek/Sudip/Escigi
It looks as if the compilation via HMG 3 is much stricter in that it validates the value of cFile as if it is a runtime.
By addiing if valtype(cFile) == "C" wherever cFile is used solves the problem.
BTW, the resultant EXE is much faster than HMG2. I wonder whether it is due to HB2.0 being used
TQVM for the speedy response and making me feel welcome on this forum
Cheers
CCH
http://cch4clipper.blogspot.com
You are correct
