HMG.4 IDE Test

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

HMG.4 IDE Test

Post by Roberto Lopez »

Well... no exactly... :)

I've modified the HMG.3 IDE to make it HMG.4 compatible and I've attached to this message.

To make it work, you must be sure that hmg.ini file point to the right location (by default it is 'C:\HMG.4\SVN') and that you have the current HMG.4 sources (at least 2011.11.20).

Some important things:

- The way in that HMG 3 IDE form designer generates code IS NOT the recommended way to code semi-oop in HMG.4. It reflects the status of HMG at first IDE release in 2004 (MiniGUI library at that time). That style will be supported for backwards compatibility only.

I'm talking about (specifically) of DEFINE WINDOW, DEFINE TAB, DEFINE TREE and other commands that requires that all properties (clauses) be specified in the same line.

This way of coding is considered DEPRECATED (backwards compatible only) in HMG.4.

The preferred semi-oop way is shown in this sample (one property by line):

Code: Select all

   DEFINE MAINWINDOW MainForm
       ROW         10
       COL         10
       WIDTH       600
       HEIGHT      600
       TITLE       "CHILD window demo"
       ONINIT      MainFrmOnInit()

- This IDE.4 is only temporary, until the new IDE be finished.

- The only example I've tested is the one included. It contains a module and a form exactly as they are created when 'New Project' command is used to create a project.

- Is highly probable that many of control code generated by IDE be not compatible with HMG.4 yet. Please do not complain about that :). Just inform us and (if possible) give us some ideas about which the problem is.

Thanks!
Attachments
ide4.zip
(959.51 KiB) Downloaded 514 times
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG.4 IDE Test

Post by Roberto Lopez »

Hi All,

I'm amazed, since most used controls code generated by IDE was compiled ok.

I've found a problem with RADIOGROUP (apparently) related with FontSize property (image attached to this message).
Image1.jpg
Image1.jpg (409.63 KiB) Viewed 9107 times
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG.4 IDE Test

Post by Roberto Lopez »

Roberto Lopez wrote:Hi All,

I'm amazed, since most used controls code generated by IDE was compiled ok.

I've found a problem with RADIOGROUP (apparently) related with FontSize property (image attached to this message).
This is the RADIOGROUP code:

Code: Select all

    DEFINE RADIOGROUP RadioGroup_1
        ROW    210
        COL    210
        WIDTH  120
        HEIGHT 50
        OPTIONS { 'Option 1','Option 2'}
        VALUE 1
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        ONCHANGE Nil
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        HELPID Nil
        TABSTOP .T.
        VISIBLE .T.
        TRANSPARENT .F.
        SPACING 25
        BACKCOLOR Nil
        FONTCOLOR Nil
        READONLY Nil
        HORIZONTAL .F. 
    END RADIOGROUP
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Re: HMG.4 IDE Test

Post by mrduck »

Roberto Lopez wrote:Hi All,

I'm amazed,
I'm not .... :-) :-) :-)
I've found a problem with RADIOGROUP (apparently) related with FontSize property (image attached to this message).
I also noted this in the past... I will investigate...
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HMG.4 IDE Test

Post by mol »

Hi Roberto!
Nice to see your back at work on HMG!
Marek
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG.4 IDE Test

Post by Roberto Lopez »

mrduck wrote:
Roberto Lopez wrote:
I've found a problem with RADIOGROUP (apparently) related with FontSize property (image attached to this message).
I also noted this in the past... I will investigate...
I've found the cause.

If you eliminate the 'spacing' property line it looks ok.

So... I guess that could be a problem with SPACING property only or between SPACING and HEIGHT properties.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Re: HMG.4 IDE Test

Post by mrduck »

Yes, it's spacing, because I don't know why the author of this code used a qboxlayout... perhaps we should avoid spacing...
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG.4 IDE Test

Post by Roberto Lopez »

[*]
mrduck wrote:Yes, it's spacing, because I don't know why the author of this code used a qboxlayout... perhaps we should avoid spacing...
In WIN32 I've implemented spacing in an extremely simple way. Each radio button is created at last button row+spacing. Just that.

Until more research about this be made, we could simply disable spacing.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG.4 IDE Test

Post by Roberto Lopez »

Francesco,

There is still some problems that can be solved changing buildapp.bat as follows:

Code: Select all

@echo off

REM
REM $Id$
REM

IF DEFINED HMGPATH GOTO HmgPathDefined

SET HMGPATH=c:\hmg.4
SET PATH=%HMGPATH%\harbour\bin;%HMGPATH%\harbour\comp\mingw\bin;%PATH%
SET HB_WITH_QT=%HMGPATH%\harbour\include

:HmgPathDefined

if "%1"=="/3" goto compatible

HBMK2 %1 %2 %3 %4 %5 %6 %7 %8 -w3 -es2 

goto end

:compatible

shift

HBMK2 %1 %2 %3 %4 %5 %6 %7 %8 -DHMG3 -i. -run

pause 

:end
The optional /3 parameter will make the required things to make the HMG3 projects work.

Could be you (or someone else) so kind to upload it?

Thanks in advance.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Re: HMG.4 IDE Test

Post by mrduck »

Roberto,
I'm preparing a new commit with all the stuff... I want to ask: do you need to change vertical/horizontal alignment of radiobuttons at run time ? Or when we open the form we can assume they are in the proper orientation ?
Post Reply