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.
Error code not making sense...
Moderator: Rathinagiri
Error code not making sense...
- Attachments
-
- New folder (2).zip
- (214.22 KiB) Downloaded 178 times
-
- New folder.zip
- (4.35 KiB) Downloaded 144 times
-
- syntax.png (41.61 KiB) Viewed 2510 times
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Error code not making sense...
You need add
to top of wiptran2012.prg
Regards
Code: Select all
DECLARE WINDOW Main_winHMG Reference wrote:DECLARE WINDOW
Declares a Window Name
DECLARE WINDOW <WindowName>
A window must be declared using this command, if you need to refer to it prior
its definition in code, or when you refer to it in a different .prg file from
the one it was defined using semi-oop syntax.
Regards
Viva INTERNATIONAL HMG 
Re: Error code not making sense...
Another stumbling block removed from my path to a new interface to my old clipper programs.
There just is no substitute for how well a forum like this can help teach others to learn new concepts.
My thanks to you as well as the folks that maintain this fine establishment.
There just is no substitute for how well a forum like this can help teach others to learn new concepts.
My thanks to you as well as the folks that maintain this fine establishment.
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Error code not making sense...
You are welcome dear Mark 
You are right, here everything is under friendship umbrella
And our slogan is :
Viva Roberto, Viva HMG, Viva friendship !
Regards
You are right, here everything is under friendship umbrella
And our slogan is :
Viva Roberto, Viva HMG, Viva friendship !
Regards
Viva INTERNATIONAL HMG 
- Rathinagiri
- Posts: 5482
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Error code not making sense...
Thanks for your timely help Esgici.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Error code not making sense...
Hi Rathi,
welcome back
I hope your brother is better
Best regards
welcome back
I hope your brother is better
Best regards
Viva INTERNATIONAL HMG 