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   |
|
vegaonline wrote on Fri, 22 January 2016 10:39I 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
|
|
|
Goto Forum:
Current Time: Sun May 04 22:36:18 CEST 2025
Total time taken to generate the page: 0.04198 seconds
|