Page 1 of 1

Syntax error

Posted: Fri Oct 22, 2010 10:32 am
by cocoking
Hello...

I'm getting syntax errors on my modal window and grid definitions:

deductio.prg(57) Error E0030 Syntax error "syntax error at 'WINDOW'"
deductio.prg(65) Error E0030 Syntax error "syntax error at '@'"

on these codes:

Code: Select all

declare window MainForm

dbselectarea("PERSONEL")
dbgotop()

aHeaders := {"Emp No.", "Employee Name", "Company"}
aWidths  := {80, 203, 100}	

DEFINE WINDOW wiDeduct ;
	AT 10, 10 ;
	WIDTH 650 ;
	HEIGHT 600 ;
	TITLE "Deductions" ;
	MODAL                              <---- line 57

	@ 10, 10 GRID grDeduct ;
		width    510 ;
		height   510 ;
		headers  aHeaders ;
		widths   aWidths ;
		rowsource "PERSONEL" ;
		columnfields {"empnum", "empname", "company"}   <---- line 65	
		
END WINDOW

CENTER WINDOW wiDeduct
ACTIVATE WINDOW wiDeduct
Please find time to analyze and help me.
TYVM.

Re: Syntax error

Posted: Fri Oct 22, 2010 11:10 am
by esgici
Hello cocoking

Did you include

Code: Select all

#include "hmg.ch" 
at beginning of every .prg file ?

Your problem may be came by this point.

Regards

--

Esgici

Re: Syntax error

Posted: Fri Oct 22, 2010 2:48 pm
by cocoking
The module is working now. You are right (once again), esgici.
I thought #include "hmg.ch" is needed only in the main prg file.

Thank you very much, esgici.