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 #38063 is a reply to message #38058] Thu, 29 November 2012 13:56 Go to previous messageGo to previous message
navi is currently offline  navi
Messages: 107
Registered: February 2012
Location: Sydney, Australia
Experienced Member
the object t1 is within the class scope of H1. and it is a private member so access is restricted only within the class. 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; }
option two is to make the global function AddNum2() to return the result as string and set the return value of the function to t1 in H1() contractor. see the example in the attachment.
its nothing to do with U++. you need to read up on C++ scope of variables and specially class scope.
  • Attachment: Test2.rar
    (Size: 1.39KB, Downloaded 264 times)
 
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: Sat May 03 14:50:43 CEST 2025

Total time taken to generate the page: 0.01828 seconds