Page 1 of 2

help with syntax

Posted: Tue Sep 24, 2019 7:37 am
by dragancesu
I use long hmg and some things still bother me, i don't like it
I prefer to use @ row, col CONTROL... instead of DEFINITON CONTROL...
that's why I don't use IDE, but many times I need help with syntax
I tried to create a program that will help me with the syntax for the controls, the parameters should be entered and you will see OK what you need to type in the text editor, but that text is in the clipboard so it is enough to press Ctrl-V or select Paste

The order of parameters at @ row, col CONTROL... and DEFINE CONTROL... is different, I don't know why but it bothers me

Pleasa write if you like it or don't like it and why

source soon

Re: help with syntax

Posted: Tue Sep 24, 2019 1:43 pm
by huiyi_ch
I like DEFINE CONTROL...
This software is so useful that adding it as a tool, such as XEDIT, will greatly facilitate coding.

Re: help with syntax

Posted: Wed Sep 25, 2019 6:51 am
by serge_girard
Me too I sometimes have problems with these things.

When I need some comtrol I copy/paste it from one of my working programs and then I'm sure it work work fine for the first time.

Serge

Re: help with syntax

Posted: Wed Oct 02, 2019 8:33 am
by dragancesu
New version with source

Re: help with syntax

Posted: Wed Oct 02, 2019 9:34 am
by mustafa
Google Translation

Hello friend Dragancesu :
Congratulations for this interesting Tool

I do not understand why the BUTTON is giving Error?
it is only for the chronological order of the mandates
I do not understand ?

I found it !!! ---> Syntax Error
Error --> HEIGTH --> ok ---> HEIGHT
Error ---> TOOLDTIP '' -> ok ---> TOOLTIP

Code: Select all


dragancesu

   @ 150, 100 BUTTON button_1 ;
      CAPTION 'caption_1'            ;
      PICTURE 'button.bmp' RIGHT ; 
      ACTION nil ;                         
      WIDTH 80 HEIGTH 25 ;   -------->  Error  -->   HEIGTH    --> ok  ---> HEIGHT
      FONT 'Arial' SIZE 10
             
     Error ---> TOOLDTIP ''     ok --->   TOOLTIP 

*-----------------------------------------------------------------*
Mustafa

       @ 150, 100 BUTTON button_1   ;
         CAPTION 'caption_1' ;
         PICTURE 'button.bmp' RIGHT ; 
         FONT "Arial" SIZE 10          ;
         ACTION nil   ;             
         WIDTH 80  HEIGHT 25 

Regards
Mustafa

Re: help with syntax

Posted: Wed Oct 02, 2019 10:54 am
by dragancesu
Hello Mustafa, try this

start CONTROL.EXE, clik on button WINDOW than OK, window definition is on display

open in yout editor, on example, test.prg and Ctrl-V and see like this

Code: Select all

#include <hmg.ch> 

PROCEDURE main 

   DEFINE WINDOW window_1 ;
      AT 100, 100 ; 
      WIDTH 800 ; 
      HEIGHT 600 ; 
      MAIN ; 
 
      *** 
      *** 
      *** 
      *** insert your code here
      *** 
      *** 
      *** 

   END WINDOW 


   ACTIVATE WINDOW window_1 

RETURN 
create next control and insert code by ctrl-v

all work but generate control BUTTON causes error during compile

Re: help with syntax

Posted: Wed Oct 02, 2019 11:06 am
by mustafa
It is not giving me any error
Did you modify the syntax error?

----> HEIGTH ----> OK HEIGHT

Code: Select all


#include <hmg.ch> 

PROCEDURE main 

   DEFINE WINDOW window_1 ;
      AT 100, 100 ; 
      WIDTH 800 ; 
      HEIGHT 600 ; 
      MAIN ; 
 
      *** 
      *** 
      *** 
   @ 100, 100 BUTTON button_1 ;
      CAPTION 'caption_1' ;
      PICTURE 'button.bmp' RIGHT ; 
      ACTION nil ;
      WIDTH 80 HEIGHT 25 ; 
      FONT 'Arial' SIZE 10 ; 

      *** 
      *** 
      *** 
      *** 

   END WINDOW 


   ACTIVATE WINDOW window_1 

RETURN 



Re: help with syntax

Posted: Wed Oct 02, 2019 11:08 am
by gfilatov
dragancesu wrote:
Wed Oct 02, 2019 10:54 am
generate control BUTTON causes error during compile
Hello Dragan,

Please be so kind to replace your typo
HEIGTH
with a correct
HEIGHT
as it was suggested by Mustafa :arrow:

Re: help with syntax

Posted: Wed Oct 02, 2019 11:22 am
by dragancesu
Thank you

p.s. it may be time for retirement

Re: help with syntax

Posted: Mon Oct 07, 2019 11:42 am
by dragancesu
New version