Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Changing EditFields from header files
Re: Changing EditFields from header files [message #38104 is a reply to message #38081] Fri, 30 November 2012 18:35 Go to previous messageGo to previous message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
nuvi:

in H1
Try2(*this);

in H2
H1 a;
void Try2(H1& a){
a.Set_t1("H2 OK");
}

That worked.

In a thread it could be:
a.Set_t1("H2 OK");
Sleep(1000);
a.Set_t1("H2 OK");
Sleep(1000);
...

The String in a.Set_t1("H2 OK"); would actually be a GPS NMEA sentence.
Fine except if it cannot be run in U++ Debug then it's a NoGo.


navi wrote on Thu, 29 November 2012 11:34



// in h2.h file

#include "h1.h"

// it is now valid to call Set_t1 as AddNum2 is now also in the 
// same class scope.

void H1::AddNum2(int a, int b){
	if ( a > b )
//		t1<<="2 OK";
		Set_t1("2 OK");	

}



I tried several variations of this.
H2.h
#include "H1.h"
void H1::Try2(){
    Set_t1("H2 OK");
}
but in H1.h
//#include "H2.h" // this must be commented out 



The t1 EditField shows "H2 OK" when run in Debug.

Thanks again, I have more than 20 hours tinkering with this.

[Updated on: Fri, 30 November 2012 21:32]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: hiding the vertical scrollbar of LineEdit Ctrl
Next Topic: Buttons in Array using ArrayCtrl
Goto Forum:
  


Current Time: Thu Jun 06 17:22:45 CEST 2024

Total time taken to generate the page: 0.01008 seconds