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 » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » How to call the methods of a class from another class
Re: How to call the methods of a class from another class [message #2287 is a reply to message #2283] Wed, 05 April 2006 21:05 Go to previous messageGo to previous message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
You can redeem half of your sinn...
To prevent the complain from compiler of "not declared" you
can use "forward declaration", that is,
class App;

by putting it above your calling class.
But this doesn't help to get the real App object(instance) and reference to it by name because it's encapsulated in main() with GUI_APP...
So, to avoid dealing with dead world you should think about alternatives...
1. Travel up (in terms of controls) with GetParent() up to TopWindow... which is not very nice
2. Travel down (in terms of your code) up to your App and use UpdateInfo from where it is declared...
3. Or think other possibilities...

P.S. I will write soon about 2. but you can try yourself.
Hint: you might need to make some objects more public...
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: "Forlano tabs" - fill EditFields from ArrayCtrl Row...
Next Topic: How to create a modal dialog
Goto Forum:
  


Current Time: Thu May 16 12:42:06 CEST 2024

Total time taken to generate the page: 0.03728 seconds