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 » [SOLVED]Control property syntax (ArrayCtrl, Button), IDE syntax guide unclear to me
Re: Control syntax (ArrayCtrl, Button), & references [message #44307 is a reply to message #44304] Sat, 21 February 2015 17:56 Go to previous messageGo to previous message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Edward,

When you derived from layout or you declare variable in your class you don't need to use operator ".". This construction is strange. Where have you declared variable "SimpleDemo"?

So,
SimpleDemo::SimpleDemo()
{
	CtrlLayout(*this, "Window title");
	Sizeable().Zoomable();
	SimpleDemo.arrLIST.AddColumn("Item"); // <- Illegal construction in c++. Write "arrLIST.AddColumn("Item");" insted.
	SimpleDemo.arrLIST.Removing(); // <- Do the same
	SimpleDemo.btnAdd <<= THISBACK(AddItem); // <- Do the same
}


If you want to explicitly refer to the derived class variables you can do something like this (But this construction is rare used):
WithSimplyDemoLayout::arrLIST.doSomething();
// In this case this is equals to:
arrLIST.doSomething();


To get current class element you can use "*this" syntax (rare used in c++).
this->myInt = 5;


Sincerely,
Klugier


U++ - one framework to rule them all.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Errors during compiling the examples
Next Topic: [SOLVED]Deleted layout controls still cause errors in compile. How? 8183 MinGW
Goto Forum:
  


Current Time: Thu May 09 16:50:30 CEST 2024

Total time taken to generate the page: 0.02459 seconds