Alternate syntax

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
karweru
Posts: 178
Joined: Fri Aug 01, 2008 1:51 pm
DBs Used: DBF,mysql,mariadb,postgresql,sqlite,odbc
Been thanked: 7 times
Contact:

Alternate syntax

Post by karweru » Sun Apr 28, 2019 3:13 pm

Hi,

I had raised this issue 10 years ago,...forgive me for raising it again...but is there a way to avoid 'hard-coding' in parameters used in alternate syntax, like windowtype in the quote below?

Code: Select all

DEFINE WINDOW <WindowName>

            ROW <nRow>

            COL <nCol>

            WIDTH <nWindth>

            HEIGHT <nHeight>

            WINDOWTYPE MAIN | CHILD | MODAL | SPLITCHILD | STANDARD | PANEL

            [ VIRTUALWIDTH <nVirtualWindth> ]

            [ VIRTUALHEIGHT <nVirtualHeight> ]

            [ TITLE <cTitle> ]

            [ ICON <cIconName> ]

            [ VISIBLE <lValue> ]

            [ TOPMOST [<lValue>] ]

            [ AUTORELEASE <lValue> ]

            [ MINBUTTON <lvalue> ]

            [ MAXBUTTON <lValue> ]

            [ SIZABLE <lValue> ]

            [ SYSMENU <lValue> ]

            [ TITLEBAR <lValue> ]

            [ CURSOR <CursorName> ]

            [ ONINIT <InitProcedureName> | <bBlock> ]

            [ ONRELEASE <ReleaseProcedureName> | <bBlock> ]

            [ ONINTERACTIVECLOSE <InteractiveCloseProcedureName> | <bBlock> ]

            [ ONMOUSECLICK <MouseClickProcedureName> | <bBlock> ]

            [ ONMOUSEDRAG <MouseDragProcedureName> | <bBlock> ]

            [ ONMOUSEMOVE <MouseMoveProcedureName> | <bBlock> ]

            [ ONSIZE <WindowSizeProcedureName> | <bBlock> ]

            [ ONMAXIMIZE <WindowMaximizeProcedureName>  | <bBlock> ]

            [ ONMINIMIZE <WindowMinimizeProcedureName>  | <bBlock> ]

            [ ONPAINT<WindowPaintProcedureName>  | <bBlock> ]

            [ BACKCOLOR <anBackColor> ]

            [ FONTNAME <cFontName> FONTSIZE <nFontSize> ]

            [ NOTIFYICON <cNotifyIconName> ]

            [ NOTIFYTOOLTIP <cNotifyTooltip> ]

            [ ONNOTIFYCLICK <NotifyClickProcedure> | <bBlock> ]

            [ ONGOTFOCUS <ProcedureName> | <bBlock> ]

            [ ONLOSTFOCUS <ProcedureName> | <bBlock> ]

            [ ONSCROLLUP <ProcedureName> | <bBlock> ]

            [ ONSCROLLDOWN <ProcedureName> | <bBlock> ]

            [ ONSCROLLLEFT <ProcedureName> | <bBlock> ]

            [ ONSCROLLRIGHT <ProcedureName> | <bBlock> ]

            [ ONHSCROLLBOX <ProcedureName> | <bBlock> ]

            [ ONVSCROLLBOX <ProcedureName> | <bBlock> ]

            [ HELPBUTTON <lValue> ]

            [ GRIPPERTEXT <cGripperText> ]

            [ BREAK lValue ]

            [ FOCUSED <lValue> ]

            ... Control Definitions...

      END WINDOW
It would really be useful for those of us used to an OOP style of coding.
Kind regards,
Gilbert.

User avatar
mustafa
Posts: 829
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Been thanked: 117 times
Contact:

Post by mustafa » Mon Apr 29, 2019 12:22 pm

Hola amigo karweru
el Maestro Roberto por el año 2010 creo que presentó
unos samples de OOP que no termino de funcionar
aquí te dejo los samples que se crearón
View

viewtopic.php?f=2&t=1393&hilit=OOP

viewtopic.php?f=2&t=1485&hilit=OOP

Suerte !!!
Mustafa
*--------------------------- Google ----------------------------*
Hello friend karweru
Master Roberto for the year 2010 I think he presented
some samples of OOP that did not finish working
here I leave you the samples that were created
View

viewtopic.php?f=2&t=1393&hilit=OOP

viewtopic.php?f=2&t=1485&hilit=OOP

Luck !!!
Mustafa
Attachments
OOP_Window_Roberto.zip
(38.74 KiB) Downloaded 38 times
Last edited by mustafa on Wed May 01, 2019 4:57 pm, edited 2 times in total.

User avatar
karweru
Posts: 178
Joined: Fri Aug 01, 2008 1:51 pm
DBs Used: DBF,mysql,mariadb,postgresql,sqlite,odbc
Been thanked: 7 times
Contact:

Post by karweru » Tue Apr 30, 2019 4:50 pm

Thanks Mustafa,

For controls creation, I"ve been calling _define* functions (same in hmgobjects), which is what more or less I'm avoiding, and preferring to call the alternate syntax, but i have trouble understanding #xcommand and #xtranslate directives.

Will keep trying.
Kind regards,
Gilbert.

User avatar
esgici
Posts: 4513
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 389 times
Been thanked: 111 times
Contact:

Post by esgici » Tue Apr 30, 2019 9:24 pm

karweru wrote:
Tue Apr 30, 2019 4:50 pm
...
i have trouble understanding #xcommand and #xtranslate directives.
...
https://vivaclipper.wordpress.com/2013/ ... irectives/
Viva INTERNATIONAL HMG :D

Post Reply