Error code not making sense...
Posted: Fri Sep 21, 2012 4:01 am
Three program files
Main.prg
Wipmainwindow.prg
Wiptran2012.prg
I have a main program MAIN.PRG that starts like this:
#include "hmg.ch"
Function Main
#include "pubvars.ch"
startup()
#include "wipmainwindow.prg"
Main_win.Center
Main_win.Activate
Return
< ... lots of functions...>
The wipmainwindow.prg defines a window
DEFINE WINDOW Main_win AT 176 , 969 WIDTH 1000 HEIGHT 480 <...morecode>
and defines a label
DEFINE LABEL mymsgbox
ROW 420
COL 260
WIDTH 520
HEIGHT 30
VALUE "Message Area"
...<more code>
I can access VALUE in a function defined in MAIN.PRG
function tryit2()
main_win.mymsgbox.value := 'Indexing'
return nil
When I call another function from an action in a button from the wipmainwindow.prg
i can not change the value from within that function using the same code
main_win.mymsgbox.value := 'Indexing'
i have to call tryit2() above to allow that function to change the VALUE contents of the label.
i get a syntax error '.' if I try and do this: (attached error screen)
tryit2()
main_win.mymsgbox.value := 'DONE'
It is not a syntax error as it works in the tryit2() function
What is the real error?
I put programs in zip file, dbf files in another zip file attached
the code in question is in wiptran2012 called function mergefiles()
This is not the real code to merge files I am just testing things in this function for now.
If you compile it and run it change the drive paths in drivedat to the location of addwip and jobtick
or just change the code of course.
I deleted all the fields and data not necessary for testing this code.
Main.prg
Wipmainwindow.prg
Wiptran2012.prg
I have a main program MAIN.PRG that starts like this:
#include "hmg.ch"
Function Main
#include "pubvars.ch"
startup()
#include "wipmainwindow.prg"
Main_win.Center
Main_win.Activate
Return
< ... lots of functions...>
The wipmainwindow.prg defines a window
DEFINE WINDOW Main_win AT 176 , 969 WIDTH 1000 HEIGHT 480 <...morecode>
and defines a label
DEFINE LABEL mymsgbox
ROW 420
COL 260
WIDTH 520
HEIGHT 30
VALUE "Message Area"
...<more code>
I can access VALUE in a function defined in MAIN.PRG
function tryit2()
main_win.mymsgbox.value := 'Indexing'
return nil
When I call another function from an action in a button from the wipmainwindow.prg
i can not change the value from within that function using the same code
main_win.mymsgbox.value := 'Indexing'
i have to call tryit2() above to allow that function to change the VALUE contents of the label.
i get a syntax error '.' if I try and do this: (attached error screen)
tryit2()
main_win.mymsgbox.value := 'DONE'
It is not a syntax error as it works in the tryit2() function
What is the real error?
I put programs in zip file, dbf files in another zip file attached
the code in question is in wiptran2012 called function mergefiles()
This is not the real code to merge files I am just testing things in this function for now.
If you compile it and run it change the drive paths in drivedat to the location of addwip and jobtick
or just change the code of course.
I deleted all the fields and data not necessary for testing this code.