Alternate syntax

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

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

Alternate syntax

Post by karweru »

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: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: Alternate syntax

Post by mustafa »

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 181 times
Last edited by mustafa on Wed May 01, 2019 4:57 pm, edited 2 times in total.
User avatar
karweru
Posts: 220
Joined: Fri Aug 01, 2008 1:51 pm
DBs Used: DBF,mysql,mariadb,postgresql,sqlite,odbc
Contact:

Re: Alternate syntax

Post by karweru »

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: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Alternate syntax

Post by esgici »

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