Page 1 of 1

Alternate syntax

Posted: Sun Apr 28, 2019 3:13 pm
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.

Re: Alternate syntax

Posted: Mon Apr 29, 2019 12:22 pm
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

Re: Alternate syntax

Posted: Tue Apr 30, 2019 4:50 pm
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.

Re: Alternate syntax

Posted: Tue Apr 30, 2019 9:24 pm
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/