nlneilson Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
Contributor
Thanks navi for the response
Quote:
you need to read up on C++ scope of variables and specially class scope.
Yes I do. I have C++ Language Tutorial from cplusplus.com
If you know something better let me know.
Quote:
its nothing to do with U++
How U++ handles EditFields may be different from M$VC, which I don't know very well either.
My post apparently was not as clear as it should have been but this may relate to it:
Quote:
if data need to be set from outside the class you have to implement a interface for that. usually through a public function like
void Set_t1(int a){ t1<=a; }
With this in H1.h if it can be called from H2.h it may work.
In java with H1 h1 = new H1(String);
then in H2 it would just be h1.t1<<= "2 OK";
I tried to make t1 global but that did not work.
How you modified the code:
in H1.h
void Set_t1(int a){ t1<<=a; }
in H2.h instead of
return AsString("2 OK");
maybe have
H1.h
void Set_t1(String a){ t1<<=a; }
H2.h
if ( a > b ) Set_t1("2 OK");
but get this error
H2.h(16) : error C3861: 'Set_t1': identifier not found
but in H1.h it is under public:
To clarify this is in GPS receiver code in a separate thread so there will be no 'return' but up to five EditFields will be changed but it needs to be done in that thread.
I cleaned up the code.
The t1 or the Set_t1(...) needs to be accessed in H2.h