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 » What Type to give a Layout as parameter?
What Type to give a Layout as parameter? [message #34369] Fri, 18 November 2011 20:08 Go to next message
Wolfgang is currently offline  Wolfgang
Messages: 146
Registered: November 2011
Location: Germany
Experienced Member
Me again... I've tried to find a way to to give a layout as a parameter to a method. But I cant find how to do it..

I have this .h
...
class Urlaub : public WithurlaubLayout<TopWindow> {
	public:
		typedef Urlaub CLASSNAME;
		Urlaub();
		WithloginLayout<ParentCtrl> loginLayout;
		WithlogoutLayout<ParentCtrl> logoutLayout;
	private:
		bool rmTab( ???? );


and in the main.cpp I have
...
Urlaub::rmTab( ???? tabLayout)
{
  int pos;
  pos = tab.Find(tabLayout);
...
}


But I dont know what type I have to use for the ???? parts...
Upp::Ctrl dont works cause of error C2248: 'Upp::Ctrl::Ctrl' : cannot access private member declared in class 'Upp::Ctrl'

Any solutions?

Background:
I want to create a method to check if a Tab with Layout X exists and if it does, remove it.
Re: What Type to give a Layout as parameter? [message #34370 is a reply to message #34369] Fri, 18 November 2011 22:15 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Wolfgang wrote on Fri, 18 November 2011 14:08

Me again... I've tried to find a way to to give a layout as a parameter to a method. But I cant find how to do it..

I have this .h
...
class Urlaub : public WithurlaubLayout<TopWindow> {
	public:
		typedef Urlaub CLASSNAME;
		Urlaub();
		WithloginLayout<ParentCtrl> loginLayout;
		WithlogoutLayout<ParentCtrl> logoutLayout;
	private:
		bool rmTab( ???? );


and in the main.cpp I have
...
Urlaub::rmTab( ???? tabLayout)
{
  int pos;
  pos = tab.Find(tabLayout);
...
}


But I dont know what type I have to use for the ???? parts...
Upp::Ctrl dont works cause of error C2248: 'Upp::Ctrl::Ctrl' : cannot access private member declared in class 'Upp::Ctrl'

Any solutions?



Well, this happens to be really unusual request...

There is a little known way how to do this: String Ctrl::GetLayoutId() returns the layout name (or element name).

Quote:


Background:
I want to create a method to check if a Tab with Layout X exists and if it does, remove it.

[/quote]

Much easier is to just remove it based on instance:

void TabCtrl::Remove(Ctrl& slave);

Mirek
Previous Topic: ArrayMap<String,TabCtrl::Item> - check if String exists..
Next Topic: Check string[i] for content
Goto Forum:
  


Current Time: Sat Apr 20 11:49:50 CEST 2024

Total time taken to generate the page: 0.04042 seconds