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 » U++ Library support » U++ Core » how to just get var from parent Layout class?
icon14.gif  how to just get var from parent Layout class? [message #41164] Fri, 08 November 2013 02:48 Go to next message
akebee is currently offline  akebee
Messages: 90
Registered: August 2011
Location: China
Member
class Frame : public WithFrameLayout<TopWindow> {
 bool bValid;
...

 AbDlg dlg;
}


Then in AbDlg, I want to ref bValid, how can i get it?

In my opinion, it would be like this:
void AbDlg::Func()
{
 Frame* p = GetParent();
 bool b = p->bValid;
}

[Updated on: Fri, 08 November 2013 02:50]

Report message to a moderator

Re: how to just get var from parent Layout class? [message #41166 is a reply to message #41164] Fri, 08 November 2013 08:10 Go to previous message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello akebee

Interesting question.

In my case I would pass a pointer to class Frame in a AbDlg::Init() function or when opening it.


Best regards
IƱaki
Previous Topic: CParser: Suggest check for overflow in ReadInt, ReadDouble...
Next Topic: GetSmartTextSize() function move/factorisation proposal
Goto Forum:
  


Current Time: Fri Mar 29 07:58:52 CET 2024

Total time taken to generate the page: 0.03327 seconds