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 » Problem in example code (Tried SplitterFrame yet minor problem.)
Re: Problem in example code [message #45898 is a reply to message #45897] Fri, 22 January 2016 14:06 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

vegaonline wrote on Fri, 22 January 2016 10:39
I have a confusion. Suppose I have a class Testing which is declared as TopWindow. Now let there be another class Plotting
as ParentCtrl. I can declare "Plotting plt" in the construction of class Testing so that I may access methods of Plotting
from Testing by using "plt.funcInPlotting".

Is there any way by which I can also refer a variable/methods of Testing from a function of Plotting?

Short answer: You can pass reference or pointer to Testing when constructing the Plotting instance, or when calling its function.

Slightly longer answer: There is many ways to do that, some better and some worse. But all of them are actually not connected to U++ in any way. This is a matter of general C++ application design. If you want to write complex applications in C++ you should already know this.

Honza
 
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
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
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
Read Message
Read Message
Read Message
Read Message
Previous Topic: Issues using 2015.2 version
Next Topic: How to build FREBSD *.so in Windows?
Goto Forum:
  


Current Time: Thu May 09 11:25:06 CEST 2024

Total time taken to generate the page: 0.01944 seconds