navi Messages: 107 Registered: February 2012 Location: Sydney, Australia
Experienced Member
Quote:
No C++ variables are passed or returned except the String that will be placed in the EditField t1.
what do you mean?
Again, you CAN NOT access t1 from Try2(). C++ Scope does not work that way. you have to pass or return variable in order to set value into t1 from Try2(). There is no clean way around it.
And trust me it was the very reason why C++ makers created the 'class scope'! To protect the class members.
Attached modified code has example of how t1 can be modified from functions from h2.h without bending or breaking C++ rules.